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

create: Support --userns=keep-id:size= #1667

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Jookia
Copy link

@Jookia Jookia commented Jan 23, 2025

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:

$ podman run --rm -it --userns=auto archlinux /bin/echo "hello world"
hello world
$ distrobox create --image archlinux test1
...
$ podman run --rm -it --userns=auto archlinux /bin/echo "hello world"
Error: creating container storage: not enough unused IDs in user namespace
$ distrobox rm test1
...
$ podman run --rm -it --userns=auto archlinux /bin/echo "hello world"
hello world

An alternative solution to this could be an option flag to allow specifying the userns type and flags.

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.

Signed-off-by: Jookia <[email protected]>
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

Successfully merging this pull request may close these issues.

1 participant