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.
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.
To Reproduce
Run the dev container using podman as normal user:
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:
Additional context
Add any other context about the problem here.