-
Notifications
You must be signed in to change notification settings - Fork 21
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
Container requires root under the rootless podman/docker container #47
Comments
Hi and thanks for contacting me. Default configuration should not try to bind on :53 even for localhost, this will require additional CAP flag and will not be used by default Port 53 is used for the healthcheck internally, you can disable it in the unbound.conf and the yaml file respectively. I never needed to enable a CAP for my image and no one should. Unbound should start with minimal permissions under user defined during run, not some hardcoded one, chroot gives a tradeoff do have root inside container I'm sorry if I don't get your point but unbound runs with user
The You are right, the id's could interfere but how to set permissions if the ids are unknown? What happens when you run the container with uid 1000? Since this container was never tested nor it was designed for use with podman, what would it need to make it work? Thanks |
Thank you for a reply. #Port 53 is used for the healthcheck internally Why not to use 5335? You can try to start Docker image with --user definition and it will fail to bind this port. #I'm sorry if I don't get your point but unbound runs with user _unbound (uid/gid 1000) with minimal permissions: Sorry, was not clear. Dockerfile you have doesn't define USER directive: https://docs.docker.com/engine/reference/builder/, so inside a container you have root privileges. #The unbound.sh startup script will be executed by root and the root user is still needed by the container OS. #Since this container was never tested nor it was designed for use with podman, what would it need to make it work? |
Will be fixed in the next update. Some permissions were missing. I'll may release a distroless version based on my Alpine image. |
Would you mind testing this?
|
Chroot never functioned properly. Many thanks to @kernbug for reporting this issue. Sorry for this lack of knowledge, I thought it's sufficient to set an entry in the unbound.conf. Everyday we learn, don't we? Libevent will not be compiled by myself anymore The image is distroless now, so no need for chroot anymore, see issue #47 I've moved some examples around, some links may be broken and will be fixed asap
The container runs distroless in the next update, thanks again for reporting this issue! |
Describe the bug
Container is not able to start with podman/docker --user option defined.
To Reproduce
Steps to reproduce the behaviour:
Expected behavior
Please complete the following information:
Additional context
Thank you for images, but it will be much appreciated if you can make them secure without root inside container to create "secure chroot", since such kind of an application doesn't requires escalated privileges (like wireguard for some scenario) to handle it's job.
The text was updated successfully, but these errors were encountered: