fix(devcontainer): add missing ubuntu user to container image#783
Merged
Conversation
Collaborator
|
This is outside my comfort zone, but it looks like a good find and fix! |
jdsika
added a commit
to jdsika/esmini
that referenced
this pull request
Mar 31, 2026
The base image (ghcr.io/bounverif/esmini:latest-devel, AlmaLinux 8.10) does not contain an 'ubuntu' user, causing Dev Containers to fail with: Error: unable to find user ubuntu: no matching entries in passwd file Add a Dockerfile that extends the base image and creates the ubuntu user (UID/GID 1000) with getent guards for idempotency. Update devcontainer.json to use build.dockerfile instead of direct image reference. Supersedes: esmini#783, esmini#785 Signed-off-by: jdsika <carlo.van-driesten@bmw.de>
The base image (ghcr.io/bounverif/esmini:latest-devel, AlmaLinux 8.10) does not contain an 'ubuntu' user, causing Dev Containers to fail with: Error: unable to find user ubuntu: no matching entries in passwd file Add a Dockerfile that extends the base image and creates the ubuntu user (UID/GID 1000) with getent guards for idempotency. Update devcontainer.json to use build.dockerfile instead of direct image reference. Supersedes: esmini#783, esmini#785 Signed-off-by: jdsika <carlo.van-driesten@bmw.de>
b6907a7 to
c7bf9ed
Compare
jdsika
added a commit
to jdsika/esmini
that referenced
this pull request
Mar 31, 2026
The base image (ghcr.io/bounverif/esmini:latest-devel, AlmaLinux 8.10) does not contain an 'ubuntu' user, causing Dev Containers to fail with: Error: unable to find user ubuntu: no matching entries in passwd file Add a Dockerfile that extends the base image and creates the ubuntu user (UID/GID 1000) with getent guards for idempotency. Update devcontainer.json to use build.dockerfile instead of direct image reference. Supersedes: esmini#783, esmini#785 Signed-off-by: jdsika <carlo.van-driesten@bmw.de>
Contributor
Author
|
Force-pushed this branch with the improved commit @eknabevcc the Dockerfile now uses |
Collaborator
|
Looks solid, thanks for the fix and nicely structured PR! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The current
devcontainer.jsonspecifies"remoteUser": "ubuntu"but the base imageghcr.io/bounverif/esmini:latest-devel(AlmaLinux 8.10) does not contain anubuntuuser. This causes VS Code Dev Containers to fail immediately with:This affects all users trying to open the project in a Dev Container (Docker, Podman, etc).
Fix
.devcontainer/Dockerfilethat extends the base image and creates theubuntuuser (UID/GID 1000)devcontainer.jsonto usebuild.dockerfileinstead of the direct image referenceThis preserves the original intent of
remoteUser: ubuntu(non-root development) without requiring changes to the upstream container image.Changes
.devcontainer/Dockerfileubuntuuser.devcontainer/devcontainer.jsonimagereplaced withbuild.dockerfile(3 lines)Tested
Verified end-to-end with Podman 5.8.1 on Windows (WSL2):
devcontainer read-configuration- OKdevcontainer up- OKubuntuuser with workspace mounted at/workspaces/esmini- OK