- 
                Notifications
    
You must be signed in to change notification settings  - Fork 34
 
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
The startup script in dev-variant container assumes that it is not run in a user namespace.
However, it is not true when using a rootless container. When it is run in a rootless container, uid 0 in the container will be mapped to the user who starts the container.
The startup script will try to create a user with uid 0 and the creation will fail with the error message.
useradd: UID 0 is not unique
To Reproduce
Run the dev container using podman as normal user:
podman run -it \
       -v "${HOME}":"${HOME}" -e EDK2_DOCKER_USER_HOME="${HOME}" \
       ghcr.io/tianocore/containers/ubuntu-20-dev:latest /bin/bash
Expected behavior
The container starts successfully and we can see the shell prompt.
Execution environment
Host OS: Ubuntu 22.04
Container Engine: podman version 4.5.0
Podman command run as normal user:
podman run -it \
       -v "${HOME}":"${HOME}" -e EDK2_DOCKER_USER_HOME="${HOME}" \
       ghcr.io/tianocore/containers/ubuntu-20-dev:latest /bin/bash
Additional context
Add any other context about the problem here.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working