Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Last user should not be root #46

Closed
030 opened this issue Dec 3, 2021 · 2 comments
Closed

Last user should not be root #46

030 opened this issue Dec 3, 2021 · 2 comments

Comments

@030
Copy link

030 commented Dec 3, 2021

This could be mitigated by creating a traefik-whoami user in the build-stage and subsequently copy it to the last-stage, e.g.: https://github.com/030/bcbsn/blob/master/Dockerfile

@ldez
Copy link
Contributor

ldez commented Dec 3, 2021

https://github.com/traefik/whoami/blob/master/Dockerfile

The root requirement is not related to the build stage.

@ldez ldez closed this as completed Dec 3, 2021
@030
Copy link
Author

030 commented Dec 3, 2021

# Create a minimal container to run a Golang static binary
FROM scratch

COPY --from=builder /usr/share/zoneinfo /usr/share/zoneinfo
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
COPY --from=builder /go/whoami/whoami .

ENTRYPOINT ["/whoami"]
EXPOSE 80

I do not see any USER entry here, so the user is root in the traefik/whoami container.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants