-
Notifications
You must be signed in to change notification settings - Fork 288
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
updateRemoteUserUID has no effect #10030
Comments
We started seeing this issue after upgrading our dev container base from Ubuntu 22.04 to 24.04. The 22.04 base image has no existing users and so creating a non-root user gives a UID of 1000, with 24.04 there's an We can work around it somewhat by forcing the UID of the user in the container to 1000, but that is just masking the problem. |
I have run into this issue on Ubuntu and MacOS hosts. I think this will particularly affect MacOS users, because MacOS assigns users to the |
I encountered the same issue, my host uid/gid was 1000/1001. I added
to the top of the devcontainer Dockerfile as a temporary workaround. |
We don't update the UID when there already is a user with that UID. In this case Ubuntu 24.04 already has a user with UID 1000, so the UID 1001 user can't be updated to use UID 1000. @samruddhikhandale This might be tricky to work around in the CLI because it might encounter various base images. Maybe we can work around it in our base images either by removing the |
There are instructions in the advanced section for creating non-root users. https://code.visualstudio.com/remote/advancedcontainers/add-nonroot-user. It has a section on editting the UID/GID when creating an image https://code.visualstudio.com/remote/advancedcontainers/add-nonroot-user#_change-the-uidgid-of-an-existing-container-user but not if the base-image includes conflicting accounts. At the moment, suggestions that pop up when you search
in a search engine don't direct to this documentation and the results that do aren't very useful (other than this issue popping up). Maybe the documentation can be updated to mention these terms for SEO. |
When noble was released, we had a long discussion regarding how to handle it and we ended up with a collective decision of letting the Sharing the couple of reasons we thought this was the right way -
@chrmarti It's been three months since we released base images with ^, not sure what's the best way is to handle it. We can still make changes given the fact that Let me know what you think! |
Given that this breaks our fix for the workspace file ownership mismatch on Linux (the UID updater) for local UID 1000, I suggest we reconsider our options. We decided to keep the Some background on the ubuntu user: https://bugs.launchpad.net/cloud-images/+bug/2005129 |
Yes, that was definitely our thoughts there.
Makes sense, thanks! |
Continuing in devcontainers/images#1056. Thanks. |
I'm running a dev container created from a base Ubuntu 24:04 image with and additional user account
On my host system my user id is 1000
Using this with the following devcontainer.json I was expecting the updateRemoteUserUID option to update the UID/GID to match my local UID/GID - which as per (https://containers.dev/implementors/json_reference/) I need to avoid permission issues in the mount, but it doesn't happen.
When I open a terminal in VSCode in the Docker the id is still set to guest
VSCode Version:
Version: 1.90.2
Commit: 5437499feb04f7a586f677b155b039bc2b3669eb
Date: 2024-06-18T22:33:48.698Z
Electron: 29.4.0
ElectronBuildId: 9728852
Chromium: 122.0.6261.156
Node.js: 20.9.0
V8: 12.2.281.27-electron.0
OS: Linux x64 6.5.0-35-generic snap
Local OS Version:
ubuntu:24.04
Containers
Steps to Reproduce:
See above for a simple Docker build that shows the issue. You need to ensue that the host uid and uid in the docker image don't match.
Generally - when using any docker image where the uid in the image does not match the uid in the container.
The text was updated successfully, but these errors were encountered: