forked from openflagr/flagr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
35 lines (29 loc) · 994 Bytes
/
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
######################################
# Prepare npm_builder
######################################
FROM node:16 as npm_builder
WORKDIR /go/src/github.com/openflagr/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.19.0-alpine3.16 as go_builder
WORKDIR /go/src/github.com/openflagr/flagr
RUN apk add --no-cache git make build-base
ADD . .
RUN make build
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=npm_builder /go/src/github.com/openflagr/flagr/browser/flagr-ui/dist ./browser/flagr-ui/dist
ADD ./buildscripts/demo_sqlite3.db /data/demo_sqlite3.db
RUN addgroup -S appgroup && adduser -S appuser -G appgroup
USER appuser
EXPOSE 18000
CMD ./flagr