Skip to content

Checkout error in container runner #26811

Discussion options

You must be logged in to vote

There are no permissions you can set inside the container image to make this work. The workspace on the runner VM is mounted to /__w/ when the runner starts the job container (check the “Initialize containers” step in the log). Assuming a GitHub hosted runner VM the workspace is owned by the user runner. So what’s happening here is that the container is running as a different non-root user and can’t write another user’s files.

The documentation on Dockerfiles for Actions mentions the following regarding USER instructions:

Docker actions must be run by the default Docker user (root). Do not use the USER instruction in your Dockerfile, because you won’t be able to access the GITHUB_WORKSPACE.

Replies: 5 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@n1ngu
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
3 participants