-
Notifications
You must be signed in to change notification settings - Fork 976
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
Self Hosted Runner running in a container fails to run steps inside a service container "sh: 0: Can't open /__w/_temp/xxx.sh" #988
Comments
Did you ever find a solution to this? |
Thank you! Exactly what I needed to see. |
I can't find any workaround for this |
How does ARC get over it? I don't get it |
Not sure if it helps but mounting the workdir from the host using |
hross You mark it as duplicate. |
@djcarpe could you find a solution to this? Which was the issue? |
I solved this problem for myself, I'm leaving a comment for others looking for a solution: |
@KrzysztofUstowski Do the folders have to be the ones of the running container or just the raw definitions? |
Your runner, as part of executing an action will create a temporary container (to execute the commands defined in the job) and it will try to map its own working directory to this newly created temporary container. The problem apears when your runner itself is embedded in a container (using dind), because when your runner tries to set the mapping for the newly created temporary container (this mapping between himself and the temp container), it actually sends the mapping request to its docker host (dind). So, if the dind container does not have access to runners Thats why you see Solution: dind container and runner container have to see, read and write the same directory My example of docker-compose.yml
|
Describe the bug
Hey,
My self-hosted runner is basically a container in itself that has access to the docker daemon socket. This allow it to perform
docker
cli commands, useful for all kinds of operations. For simple stuff it's quite neat and works as expected.Now, I am trying to create a workflow that starts up a container and then tries to run its steps inside that container.
But it seems that it can't even load some simple bash "run" steps such as
echo "test"
and returns this instead:If I define the
shell
parameter with value bash in the run step, I get something slightly different:To Reproduce
Here's my yaml section in question:
Expected behavior
Runner runs the echo step inside my custom image without erroring out
Runner Version and Platform
myoung34/github-runner:2.276.1-ubuntu-bionic
Amazon Linux 2 x86_64
EDIT 16/2:
Tried with setting privileged=true for the runner container, got the same errors
Tried also to use another non-custom container straight from the docker hub (i.e ubuntu:20.04), got the same errors
The text was updated successfully, but these errors were encountered: