forked from arriven/db1000n
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
32 lines (22 loc) · 708 Bytes
/
Copy pathDockerfile
File metadata and controls
32 lines (22 loc) · 708 Bytes
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
FROM golang:1.17 as builder
WORKDIR /build
# pre-copy/cache go.mod for pre-downloading dependencies and only redownloading them in subsequent builds if they change
COPY go.mod .
RUN go mod download && go mod verify
COPY . .
ARG ENCRYPTION_KEYS
ARG DEFAULT_CONFIG_VALUE
ARG CA_PATH_VALUE
ARG PROMETHEUS_BASIC_AUTH
RUN make build_encrypted
FROM alpine:3.15.2 as advanced
RUN apk add --no-cache --update curl==7.80.0-r0
WORKDIR /usr/src/app
COPY --from=builder /build/db1000n .
CMD ["./db1000n", "--enable-primitive=false"]
FROM alpine:3.15.2
RUN apk add --no-cache --update curl==7.80.0-r0
WORKDIR /usr/src/app
COPY --from=builder /build/db1000n .
VOLUME /usr/src/app/config
ENTRYPOINT ["./db1000n"]