forked from openflagr/flagr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
39 lines (34 loc) · 1.16 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
######################################
# Prepare npm_builder
######################################
FROM node:10 as npm_builder
WORKDIR /go/src/github.com/checkr/flagr
ADD . .
ARG FLAGR_UI_POSSIBLE_ENTITY_TYPES=null
ENV VUE_APP_FLAGR_UI_POSSIBLE_ENTITY_TYPES ${FLAGR_UI_POSSIBLE_ENTITY_TYPES}
RUN make build_ui
######################################
# Prepare go_builder
######################################
FROM golang:1.12 as go_builder
WORKDIR /go/src/github.com/checkr/flagr
ADD . .
RUN make build
######################################
# Copy from builder to alpine image
######################################
FROM alpine:3.6
RUN apk add --no-cache libc6-compat ca-certificates curl
WORKDIR /go/src/github.com/checkr/flagr
VOLUME ["/data"]
ENV HOST=0.0.0.0
ENV PORT=18000
ENV FLAGR_DB_DBDRIVER=sqlite3
ENV FLAGR_DB_DBCONNECTIONSTR=/data/demo_sqlite3.db
ENV FLAGR_RECORDER_ENABLED=false
COPY --from=go_builder /go/src/github.com/checkr/flagr/flagr ./flagr
COPY --from=npm_builder /go/src/github.com/checkr/flagr/browser/flagr-ui/dist ./browser/flagr-ui/dist
ADD ./buildscripts ./buildscripts
ADD ./buildscripts/demo_sqlite3.db /data/demo_sqlite3.db
EXPOSE 18000
CMD ./flagr