-
Notifications
You must be signed in to change notification settings - Fork 416
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
uid mapping problem with ubuntu-24.04 base image #1056
Comments
It seems the devcontainer images are based on these https://hub.docker.com/_/buildpack-deps/ which themselves are based on the official ubuntu images https://hub.docker.com/_/ubuntu Apparently the extra user originates from there:
|
Hi 👋
Yes, that's correct! With the newer release of Hence, we decided to let This is not the case with #1036 mentions the same thing in the description! |
So is the image supposed to work with UID 1001 just as before? For now it is not, not at least for me. (Of course it is possible that there is something unrelated going on with my setup) |
I have the exact same problem 😉 |
Adding this to my Dockerfile to fix it: # Using mcr.microsoft.com/devcontainers/base:ubuntu-24.04 as base image
RUN userdel -r ubuntu; usermod -u 1000 vscode; groupmod -g 1000 vscode |
Problem
Using image ubuntu-24.04 (latest/
dd2da503391d
) as base for a devcontainer builds and launches normally, but thevscode
user cannot create or modify files due to the fact thatvscode
uid is 1001 and the mounted workspace is owned by uid 1000.(I am unsure how the ID mapping works between host and container; my host user also happens to have uid 1000, which might obfuscate the underlying issue. )
The problem seems to be caused by the image containing extra user named
ubuntu
that has been given the uid 1000 before uservscode
has been created. I can create an modify files as that user viasudo su - ubuntu
.The problem does not appear with to ubuntu-22.04 or earlier, which do not have the extra
ubuntu
user:Workaround
I added this to my
Dockerfile
right after theFROM
line:Now rebuilding and launching the image works as expected.
The text was updated successfully, but these errors were encountered: