Closed perezd closed 2 years ago
Also, in the container locally vscode user is user 1000 (according to id vscode
):
uid=1000(vscode) gid=1000(vscode) groups=1000(vscode),999(golang),998(nvm)
The built container w/ this github action responds with this:
uid=1001(vscode) gid=121(vscode) groups=121(vscode),999(golang),998(nvm)
Not sure why it's different.
OK the problem was fixed by setting: skipContainerUserIdUpdate
to true. That was just a very unclear option at first.
I have a simple Golang-based docker container, nothing special, looks like this:
My devcontainer.json looks like this:
Notice that the user is
vscode
. Locally, if I built this container and runls -l /go/pkg/mod
, I see something like this:Notice the vscode user is properly named as the owner. Everything working as expected. Now, If I do the very same thing w/ the GitHub Action, I see this:
Here the username is
1000
, and myrunCmd
togo test -v ./...
results in a bunch of permission denied errors.I verified that the container built by this github action believes it is correctly logged in as the
vscode
user, but this file system seems to not be consistent with what I am producing locally when VSCode builds this container.Am I doing something wrong? This feels like a bug, it should be otherwise fully reproducible.