Skip to content

Commit

Permalink
Change container image USER to UID (open-telemetry#738)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
kraman authored Feb 23, 2022
1 parent 0aaa2a7 commit c8a90e7
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 65532:65532

ENTRYPOINT ["/manager"]

0 comments on commit c8a90e7

Please sign in to comment.