-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
36 lines (25 loc) · 773 Bytes
/
Dockerfile
File metadata and controls
36 lines (25 loc) · 773 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
33
34
35
36
FROM golang:1.20-alpine as builder
WORKDIR /go/src/app
COPY . .
RUN go get -d -v ./...
RUN go install -v ./...
# ======================================================
FROM golang:1.20-alpine as final
ARG ENVIRONMENT
ARG AUTH_SERVER
ARG SEC_PREFIX
ARG PROJECT
WORKDIR /go/src/app
COPY --from=builder /go/bin/api.default.indicoinnovation.pt /go/bin/
COPY --from=builder /go/src/app/private.pem .
COPY --from=builder /go/src/app/config.yaml .
COPY --from=builder /go/src/app/innovation.json .
EXPOSE 9090
ENV INNOVATION_CREDENTIALS=/go/src/app/innovation.json
ENV AUTH_SERVER=$AUTH_SERVER
ENV SEC_PREFIX=$SEC_PREFIX
ENV ENVIRONMENT=$ENVIRONMENT
ENV PROJECT=$PROJECT
RUN apk add dumb-init
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
CMD api.default.indicoinnovation.pt