File tree Expand file tree Collapse file tree 1 file changed +17
-7
lines changed
Expand file tree Collapse file tree 1 file changed +17
-7
lines changed Original file line number Diff line number Diff line change 1- # Builder-Stage
2- FROM golang:1.25.1-alpine3.22 AS builder
1+ # Variables
2+ ARG ALPINE_VERSION=3.22
3+ ARG GOLANG_VERSION=1.25.1
4+
5+ FROM alpine:${ALPINE_VERSION} AS builder
6+
7+ #
8+ # Builder-Stage ++++++++++++++++++++++++++++++++++++++++
9+ #
10+ FROM golang:${GOLANG_VERSION}-alpine${ALPINE_VERSION} AS builder
311WORKDIR /app
412
513COPY go.mod go.sum ./
@@ -8,14 +16,16 @@ RUN go mod download
816COPY . .
917RUN go build -o waitfor
1018
11- # Runner
12- FROM alpine:3.22.1
19+ #
20+ # Final-Stage ++++++++++++++++++++++++++++++++++++++++
21+ #
22+ FROM alpine:${ALPINE_VERSION}
1323
1424# Create a non-root user "app" to run the application
15- RUN addgroup -g 1000 app && adduser -u 1000 -G app -S app
25+ RUN addgroup -g 65532 app && adduser -u 65532 -G app -S app
1626
1727COPY --from=builder /app/waitfor /usr/local/bin/waitfor
1828
19- USER 1000:1000
29+ USER 65532:65532
2030
21- ENTRYPOINT ["waitfor" ]
31+ ENTRYPOINT ["waitfor" ]
You can’t perform that action at this time.
0 commit comments