-
Notifications
You must be signed in to change notification settings - Fork 14
Fix build error due to conflicting uid:gid #28
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
base: main
Are you sure you want to change the base?
Conversation
It also might be better to use containerUser instead of remoteUser? |
I used remoteUser as that is what the other container templates were using. |
I haven't found any example where a process is run as the containerUser instead of the remoteUser but since we don't need anything run as root, I think it's safer to override containerUser. |
While all the Microsoft authored containers still use |
They delete the ubuntu user in their base image, so uid:gid doesn't conflict between that and the vscode user: |
Based on the link in my previous comment, earlier Ubuntu base images didn't create the ubuntu user? This should probably work. I haven't tested it with older Swift versions as I found out that using a dev container for Swift on Linux is just more complicated than having Swift installed locally, so I will just stick to that. Since the uid:gid will get updated due to updateRemoteUserUID defaulting to true, I think it is better to leave those options out. edit: others also ran into this issue: https://askubuntu.com/questions/1513927/ubuntu-24-04-docker-images-now-includes-user-ubuntu-with-uid-gid-1000 |
Fixes #27
I found out that VSCode supports working through an SSH connection so I could try out dev containers on my desktopless Linux server from my Windows machine.
I got the same error as in codespaces described in the issue.
I haven't tried this fix in codespaces but I don't see why it shouldn't work.
Added all the explanation in a comment, so if people decide that they want to change the name of their user inside the devcontainer, they will see the comment and will be able make an educated decision whether they really want to change it or not.