File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- ARG DISTROLESS_IMAGE=gcr.io/distroless/base
1+ # syntax=docker/dockerfile:1
2+ FROM golang:1.19-alpine AS build-env
3+ RUN mkdir -p /go/src/confluence-gardner
24
3- # using base nonroot image
4- # user:group is nobody:nobody, uid:gid = 65534:65534
5- FROM ${DISTROLESS_IMAGE}
5+ # Copy the module files first and then download the dependencies. If this
6+ # doesn't change, we won't need to do this again in future builds.
7+ WORKDIR /go/src/confluence-gardner
68
7- # Copy our static executable
8- COPY confluence-gardner /confluence-gardner
9+ COPY go.* ./
10+ RUN go mod download
911
10- # Run the hello binary.
11- ENTRYPOINT ["/confluence-gardner" ]
12+ WORKDIR /go/src/confluence-gardner
13+ ADD conf conf
14+ COPY *.go ./
15+ RUN go build -o confluence-gardner
16+
17+ # final stage
18+ FROM alpine:latest
19+ COPY --from=build-env /go/src/confluence-gardner/confluence-gardner /usr/local/bin/confluence-gardner
20+ RUN mkdir -p /output
21+ ENV DIRECTORY /output
22+ ENTRYPOINT ["confluence-gardner" ]
Original file line number Diff line number Diff line change 1+ ARG DISTROLESS_IMAGE=gcr.io/distroless/base
2+
3+ # using base nonroot image
4+ # user:group is nobody:nobody, uid:gid = 65534:65534
5+ FROM ${DISTROLESS_IMAGE}
6+
7+ # Copy our static executable
8+ COPY confluence-gardner /confluence-gardner
9+
10+ # Run the hello binary.
11+ ENTRYPOINT ["/confluence-gardner" ]
You can’t perform that action at this time.
0 commit comments