8b4b2bcf26b88097fd054a1bd9b74fdb725d2ff0
[nonrtric/rapp/orufhrecovery.git] / goversion / Dockerfile
1 ##
2 ## Build
3 ##
4 FROM golang:1.17.1-bullseye AS build
5
6 WORKDIR /app
7
8 COPY go.mod ./
9 COPY go.sum ./
10 RUN go mod download
11
12 COPY . ./
13
14 RUN go build -o /docker-oruclosedloop
15
16 ##
17 ## Deploy
18 ##
19 FROM gcr.io/distroless/base-debian11
20
21 WORKDIR /
22
23 ## Copy from "build" stage
24 COPY --from=build /docker-oruclosedloop .
25 COPY --from=build /app/security/* /security/
26 COPY --from=build /app/o-ru-to-o-du-map.csv .
27
28 USER nonroot:nonroot
29
30 ENTRYPOINT ["/docker-oruclosedloop"]