--userns=keep-id:uid=1001,gid=0
: container create failed (no logs from conmon)
#22078
Labels
kind/bug
Categorizes issue or PR as related to a bug.
locked - please file new issue/PR
Assist humans wanting to comment on an old issue or PR with locked comments.
Issue Description
I'm trying to spin up a VS Code DevContainer using a UBI9/python-311 image, which is setup to use a user with UID 1001, and GID 0.
I have gotten it to work by mapping it to root inside the container, but I really would like to have it running as UID 1001. For this i'm adding
--userns="keep-id:uid=1001,gid=1001"
as runArgs, which seem to work flawlessly, except for the fact that the GID doesn't match the users GID inside the container, so when files are created inside the DevContainer they get the wrong GID outside (wrong not being my local users default GID).I would expect that I could run the DevContainer with
--userns="keep-id:uid=1001,gid=0"
and have eveything working as expected, however Podman fails with an error when i try to do this. It seems like the same parsing error happens if I try and set uid to 0 in the above.I am explicitly using the keep-id feature, as i don't know the UID of everyone who is going to use this, so
--uidmap
and--gidmap
is not easily useable in this scenario.Steps to reproduce the issue
Steps to reproduce the issue
podman run --rm -it --userns=keep-id:uid=1001,gid=0 registry.access.redhat.com/ubi9/python-311:latest bash
Describe the results you received
Podman errored with the following:
Describe the results you expected
That the container starts with GID 0 mapped to 0 such that it matched my default group outside the container.
Something like the following (hopefully i have calculated the numbers correctly below):
podman info output
Running on CentOS Stream 8
The text was updated successfully, but these errors were encountered: