mirror of
https://github.com/stakater/Reloader.git
synced 2026-08-27 14:37:17 +00:00
Non-root user should be specified in numeric form in Dockerfile
This commit is contained in:
+2
-2
@@ -1,5 +1,5 @@
|
|||||||
# Build the manager binary
|
# Build the manager binary
|
||||||
FROM --platform=${BUILDPLATFORM} golang:1.15.2 as builder
|
FROM --platform=${BUILDPLATFORM} golang:1.16 as builder
|
||||||
|
|
||||||
ARG TARGETOS
|
ARG TARGETOS
|
||||||
ARG TARGETARCH
|
ARG TARGETARCH
|
||||||
@@ -26,7 +26,7 @@ RUN CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} GO111MODULE=on go build
|
|||||||
FROM gcr.io/distroless/static:nonroot
|
FROM gcr.io/distroless/static:nonroot
|
||||||
WORKDIR /
|
WORKDIR /
|
||||||
COPY --from=builder /workspace/manager .
|
COPY --from=builder /workspace/manager .
|
||||||
USER nonroot:nonroot
|
USER 65532:65532
|
||||||
|
|
||||||
# Port for metrics and probes
|
# Port for metrics and probes
|
||||||
EXPOSE 9090
|
EXPOSE 9090
|
||||||
|
|||||||
Reference in New Issue
Block a user