-
Notifications
You must be signed in to change notification settings - Fork 482
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
[Incompatibility] Change in actions/runner-images
breaks devcontainers if image has user with UID 1001 or group with GID 999
#723
Comments
Hi 👋 Thanks for the details information, I am sure people running into similar issues would benefit from it! ✨
Dev container Features and Images repo uses the mentioned ^ images within GitHub Actions (Examples - smoke test - workflow, and sample action-run). I wonder why don't we see such errors 🤔
@rradczewski Does things work if you comment this ^ line? https://github.com/rradczewski/kata-bootstraps/blob/main/dotnet/.devcontainer.json#L4 |
Ah, we are seeing such issues in this repo as well. See https://github.com/devcontainers/images/actions/runs/6014530431/job/16314428455 From actions/runner-images#8160 (comment)
I believe we need to update the |
The log for that run is rather confusing to me. I would expect the
I temporarily run all devcontainers with
All images with a group with In the reproducer repository (https://github.com/rradczewski/kata-bootstraps-reproducer/), I use a container with the problematic users and gids existing. One with the
A tricky situation, I agree. A policy for |
Quick update: Investigated this issue with the dev containers team, few findings -
|
Yepp, that's what
I think I understood this differently, as in, the docker group used to be
I agree this is the way to go for the time being and appreciate the effort, otherwise it's gonna keep popping up. This would probably also be necessary for images that create extra groups like javascript-node. Thanks a lot for the quick response! |
Newer ubuntu (action runner) images were released last week with actions/runner-images#8201 changes. This has fixed the ID problems we have been seeing. Also, on the CLI side, we have devcontainers/cli#635 opened which fixes microsoft/vscode-remote-release#7284 Feel free to reopen if the issue resurfaces. |
This is not a bug, but a recently introduced incompatibility between the provided devcontainer images and using them on github actions. I'm filing it hoping it will help others identify the problem they're experiencing. Feel free to close this issue.
I'm using devcontainer images to provide turnkey project boilerplates for coding exercises in rradczewski/kata-bootstraps. Recently, builds started to fail with permission errors (see https://github.com/rradczewski/kata-bootstraps/actions/runs/6025462340).
The issue seems to arise from
ghcr.io/devcontainers/features/node:1
creating a system group that will be assigned GID999
, which, after a recent update to the GHA imageubuntu-latest
, will coincidentally be the GID the GHA user is running with (uid=1001(runner) gid=999(docker) groups=999(docker),4(adm),101(systemd-journal)
as per https://github.com/rradczewski/kata-bootstraps-reproducer/actions/runs/6025545201/job/16346481450#step:2:5).This means the
updateUID
script will no longer update theremoteUser
to match the host user and thus will lead to the permission errors.Affected images
At least all images that include
ghcr.io/devcontainers/features/node:1
in theirdevcontainer.json
will most likely be affected. Thejavascript-node
image further creates anothernpm
group which faces the same issue.Reproducer
A minimal reproducer using busybox is available in https://github.com/rradczewski/kata-bootstraps-reproducer/tree/1037fdcbe0c7db88d765646a6842acd222b4af70 - see this run for a good example: https://github.com/rradczewski/kata-bootstraps-reproducer/actions/runs/6025545201/job/16346488288
Other issues
yarn install
in a devcontainer actions/runner-images#8160Workaround
As per microsoft/vscode-remote-release#7284 (specifically this comment) a workaround is to delete the groups using GID 999 in the Dockerfile that is used to create the container, or to specifically avoid the GID 999 when creating groups.
The text was updated successfully, but these errors were encountered: