We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7dfb1d1 commit 907e097Copy full SHA for 907e097
Dockerfile
@@ -1,6 +1,7 @@
1
# Variables
2
ARG ALPINE_VERSION=3.22
3
ARG GOLANG_VERSION=1.25.1
4
+ARG USERID=65532
5
6
FROM alpine:${ALPINE_VERSION} AS builder
7
@@ -20,12 +21,15 @@ RUN go build -o waitfor
20
21
# Final-Stage ++++++++++++++++++++++++++++++++++++++++
22
#
23
FROM alpine:${ALPINE_VERSION}
24
+ARG USERID
25
26
# Create a non-root user "app" to run the application
-RUN addgroup -g 65532 app && adduser -u 65532 -G app -S app
27
+RUN addgroup -g ${USERID} app && adduser -u ${USERID} -G app -S app
28
29
+# Copy compiled bin into final image
30
COPY --from=builder /app/waitfor /usr/local/bin/waitfor
31
-USER 65532:65532
32
+# Set to nonroot user
33
+USER ${USERID}:${USERID}
34
35
ENTRYPOINT ["waitfor"]
0 commit comments