-
-
Notifications
You must be signed in to change notification settings - Fork 27
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 run #98
Comments
I think that we can try adding this to the base image 🤔 |
apart from Alternatively, I suppose the "correct" way is to have:
|
You should prefer to run as non-root via rootless containers instead, or when supported via If you're choosing to run a rootful container as non-root for security reasons, and some exploit did permit a container escape... should that host user have permission to use the CLI to docker daemon without credentials (as is often a convenience done), you would be avoiding the non-root security benefit since the attacker could become root and own the system anyway 🤷♂ (similar to access to the docker socket in the container) The non-root in container practice is meant to avoid that by not sharing an ID with the host that has such privilege. |
PR is welcome |
potentially worth documenting how to run as non-root users (related: caddyserver/caddy-docker#104)?
I had to do:
which allows building using e.g.
--arg CADDY_GID=$(getent group docker | cut -d: -f3) --arg CADDY_UID=$(id -u)
The text was updated successfully, but these errors were encountered: