-
Notifications
You must be signed in to change notification settings - Fork 468
create: Support --userns=keep-id:size= #1667
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @Jookia seems like an interesting addition!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This breaks the ability to run nested containers.
I'm not really super-concerned about this, but maybe we want to propagate this change in the docs?
Currently there are a couple of tips on how to run podman/docker inside a distrobox, we might want to update those if this breaks the compatibility
and maybe have some env var thing (like: DBX_USERNS_NOLIMIT
?) that bypasses this for needed cases
I think the right way is to ask for more UIDs for your container if you want to run nested podman. Maybe a way to specify that if you can't already would be good? |
I think we can simply skip this limit if explicitly set (eg via env variable at creation time), nested containers are quite a corner case, so I don't believe we want too much of an ergonomic solution (cli flags and such) I think adding this env variable check, plus updating the docs for nested containers needs, is enough |
Yeah I can't figure out how to do this. Sorry. |
Oops, a bit premature to close this. Could you give me some concrete suggestions on how to implement this? |
Currently distrobox will reserve all subuids/subgids available. This has the unfortunate effect of blocking other containers from running that require their own set of subuids/subgids. podman has added a feature that lets us restrict the amount of subuids/subgids we request. If available, set the amount to 65536 which is the standard amount needed for a typical Linux single container. Disable this by setting DBX_USERNS_NOLIMIT=1. Signed-off-by: Jookia <[email protected]>
5dfc71e
to
409dcd0
Compare
I have updated the PR to add a way to disable this using the suggest environment variable. |
Currently distrobox will reserve all subuids/subgids available. This has the unfortunate effect of blocking other containers from running that require their own set of subuids/subgids.
podman has added a feature that lets us restrict the amount of subuids/subgids we request. If available, set the amount to 65536 which is the standard amount needed for a typical Linux single container.
This breaks the ability to run nested containers.
To use this feature you must compile and run the git version of podman. Without it this happens with regular distrobox use:
An alternative solution to this could be an option flag to allow specifying the userns type and flags.