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

non-root / unprivileged docker image #668

Closed
candrews opened this issue Aug 4, 2022 · 4 comments
Closed

non-root / unprivileged docker image #668

candrews opened this issue Aug 4, 2022 · 4 comments

Comments

@candrews
Copy link
Contributor

candrews commented Aug 4, 2022

Describe the bug

It's a nice practice for security reasons to have docker images use a non-root user.

For example, nginx publishes nginxinc/nginx-unprivileged (which uses the non-root user nginx) and nginx which uses root.

Ideally, the non-root / unprivileged Dockerfile may be as simple as:

FROM clamav/clamav:0.105.1
USER clamav

and those images would be published alongside the existing (root user using) images with a suffix, for example, there would be:

  • latest
  • latest-unprivileged
  • 0.105.1
  • 0.105.1-unprivileged
    etc

How to reproduce the problem

Run a docker image, for example, docker run -it --entrypoint /bin/sh clamav/clamav, and note that the user is root.

It would be nice if one could run docker run -it --entrypoint /bin/sh clamav/clamav:latest-unprivileged and see that a non-root user is used.

@candrews
Copy link
Contributor Author

candrews commented Aug 4, 2022

#666 would be required for this issue

@val-ms
Copy link
Contributor

val-ms commented Aug 4, 2022

@candrews I believe this issue is a duplicate of #478
Is that correct?

@candrews
Copy link
Contributor Author

@candrews I believe this issue is a duplicate of #478 Is that correct?

I wasn't aware of #478, thank you for pointing it out. I've added a comment: #478 (comment)

I think it's very important for both root and non-root images to be published, which I've stated in this issue, whereas the current description of #478 seems to indicate that only non-root images would be published going forward (which would be a major problem for me and IMHO a major break in backwards compatibility).

@val-ms
Copy link
Contributor

val-ms commented Nov 15, 2022

Closing this one to continue discussion in #478 and I will update the title and make a comment along those lines.

@val-ms val-ms closed this as completed Nov 15, 2022
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