Open jdratlif opened 7 months ago
We automatically update UID/GID of the container user for the first dev container, the other container is not considered a dev container at that point, but is also started by Docker Compose.
We currently look at each devcontainer.json in isolation without considering any of the other devcontainer.json files, so we don't know that the second container should get the UID/GID update like the first.
Thanks, this was what I thought was happening. I assume the UID/GID change has to happen during the build process, but we can switch to using the docker user at attach time, so that's why I am the docker user in both places, but without the UIDs.
It would be really helpful if there were some way to f ix the UID/GID in multiple containers. As it exists now, it's harder to mount a local git repo and work on a custom backend and frontend simultaneously. You have to rebuild the container you're working with each time or the user won't have the right permissions.
There are workarounds. Rebuilding the container. Attaching as root (breaks local permissions, but it doesn't prevent working). Cloning the git repo in a docker volume and using root is probably easiest.
I have same problem in case I try to develop both of frontend and backend by following this article: https://code.visualstudio.com/remote/advancedcontainers/connect-multiple-containers
updateRemoteUserUID
seems to have no effect on containers other than the first.
It would be really helpful if there were some way to f ix the UID/GID in multiple containers.
:+1:
Steps to Reproduce:
ls -l
.docker
user.ls -l
.I expected that the files in both containers would be owned by the docker user. I am the docker user in both containers, but the UIDs are not being fixed.
Here is a two minute video demonstrating the entire problem on a fresh Linux Mint 21.3 VM. New docker and VS code install. Local user pve added to docker group. Only extension is devcontainers. Everything is current as of 2024-03-06.
https://technoplaza.net/temp/devcontainer-issue-20240306.mp4
My firefox couldn't play the h265 video captured by OBS, but chrome and smplayer worked.
Does this issue occur when you try this locally?: Yes Does this issue occur when you try this locally and all extensions are disabled?: Yes