Skip to content

Commit

Permalink
Remove duplicated user declaration / configuration
Browse files Browse the repository at this point in the history
The image is already running as nonroot, specified via the image tag (`gcr.io/distroless/static:nonroot`)
Specifing it here again using the username makes deploying it to kubernetes slightly more annoying as this failed the `runAsNonRoot` securityContext check as kubernetes can't verify that this is actually non-root as it's not configured via the uid.

Signed-off-by: Jannik Hollenbach <[email protected]>
  • Loading branch information
J12934 authored and Ilyesbdlala committed Apr 16, 2024
1 parent 616f9e4 commit 7be619f
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,5 @@ RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -a -o telemetr
FROM gcr.io/distroless/static:nonroot
WORKDIR /
COPY --from=builder /workspace/telemetry .
USER nonroot:nonroot
ENV GIN_MODE release
ENTRYPOINT ["/telemetry"]

0 comments on commit 7be619f

Please sign in to comment.