blob: 8b4b2bcf26b88097fd054a1bd9b74fdb725d2ff0 [file] [log] [blame]
elinuxhenrikc78feea2022-04-07 17:01:47 +02001##
2## Build
3##
4FROM golang:1.17.1-bullseye AS build
5
6WORKDIR /app
7
8COPY go.mod ./
9COPY go.sum ./
10RUN go mod download
11
12COPY . ./
13
14RUN go build -o /docker-oruclosedloop
15
16##
17## Deploy
18##
elinuxhenrikc7847c92022-06-02 14:48:38 +020019FROM gcr.io/distroless/base-debian11
elinuxhenrikc78feea2022-04-07 17:01:47 +020020
21WORKDIR /
22
23## Copy from "build" stage
24COPY --from=build /docker-oruclosedloop .
elinuxhenrikc7847c92022-06-02 14:48:38 +020025COPY --from=build /app/security/* /security/
elinuxhenrikc78feea2022-04-07 17:01:47 +020026COPY --from=build /app/o-ru-to-o-du-map.csv .
27
28USER nonroot:nonroot
29
30ENTRYPOINT ["/docker-oruclosedloop"]