Skip to content

Commit

Permalink
Change container image USER to UID
Browse files Browse the repository at this point in the history
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
  • Loading branch information
kraman authored Feb 23, 2022
1 parent 9a49863 commit 95e9244
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@ RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -ldflags="-X $
FROM gcr.io/distroless/static:nonroot
WORKDIR /
COPY --from=builder /workspace/manager .
USER nonroot:nonroot
USER 1002:1002

ENTRYPOINT ["/manager"]

0 comments on commit 95e9244

Please sign in to comment.