Skip to content

Commit 373fe17

Browse files
authored
Change container image USER to UID (#738)
* Change container image USER to UID Kubernetes requires USER to be UID in order to verify running as non root. ref https://github.com/kubernetes/kubernetes/blob/master/pkg/kubelet/kuberuntime/security_context_others.go#L49 * Use 65532 as nonroot UID
1 parent 9a49863 commit 373fe17

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,6 @@ RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -ldflags="-X $
3434
FROM gcr.io/distroless/static:nonroot
3535
WORKDIR /
3636
COPY --from=builder /workspace/manager .
37-
USER nonroot:nonroot
37+
USER 65532:65532
3838

3939
ENTRYPOINT ["/manager"]

0 commit comments

Comments
 (0)