File tree Expand file tree Collapse file tree 3 files changed +15
-6
lines changed Expand file tree Collapse file tree 3 files changed +15
-6
lines changed Original file line number Diff line number Diff line change @@ -27,8 +27,11 @@ LABEL org.opencontainers.image.source="https://github.com/cloudflare/cloudflared
2727# copy our compiled binary
2828COPY --from=builder --chown=nonroot /go/src/github.com/cloudflare/cloudflared/cloudflared /usr/local/bin/
2929
30- # run as non-privileged user
31- USER nonroot
30+ # run as nonroot user
31+ # We need to use numeric user id's because Kubernetes doesn't support strings:
32+ # https://github.com/kubernetes/kubernetes/blob/v1.33.2/pkg/kubelet/kuberuntime/security_context_others.go#L49
33+ # The `nonroot` user maps to `65532`, from: https://github.com/GoogleContainerTools/distroless/blob/main/common/variables.bzl#L18
34+ USER 65532:65532
3235
3336# command / entrypoint of container
3437ENTRYPOINT ["cloudflared" , "--no-autoupdate" ]
Original file line number Diff line number Diff line change @@ -22,8 +22,11 @@ LABEL org.opencontainers.image.source="https://github.com/cloudflare/cloudflared
2222# copy our compiled binary
2323COPY --from=builder --chown=nonroot /go/src/github.com/cloudflare/cloudflared/cloudflared /usr/local/bin/
2424
25- # run as non-privileged user
26- USER nonroot
25+ # run as nonroot user
26+ # We need to use numeric user id's because Kubernetes doesn't support strings:
27+ # https://github.com/kubernetes/kubernetes/blob/v1.33.2/pkg/kubelet/kuberuntime/security_context_others.go#L49
28+ # The `nonroot` user maps to `65532`, from: https://github.com/GoogleContainerTools/distroless/blob/main/common/variables.bzl#L18
29+ USER 65532:65532
2730
2831# command / entrypoint of container
2932ENTRYPOINT ["cloudflared", "--no-autoupdate"]
Original file line number Diff line number Diff line change @@ -22,8 +22,11 @@ LABEL org.opencontainers.image.source="https://github.com/cloudflare/cloudflared
2222# copy our compiled binary
2323COPY --from=builder --chown=nonroot /go/src/github.com/cloudflare/cloudflared/cloudflared /usr/local/bin/
2424
25- # run as non-privileged user
26- USER nonroot
25+ # run as nonroot user
26+ # We need to use numeric user id's because Kubernetes doesn't support strings:
27+ # https://github.com/kubernetes/kubernetes/blob/v1.33.2/pkg/kubelet/kuberuntime/security_context_others.go#L49
28+ # The `nonroot` user maps to `65532`, from: https://github.com/GoogleContainerTools/distroless/blob/main/common/variables.bzl#L18
29+ USER 65532:65532
2730
2831# command / entrypoint of container
2932ENTRYPOINT ["cloudflared", "--no-autoupdate"]
You can’t perform that action at this time.
0 commit comments