Comments (3)
@ukewea great discovery!! I too was having the same issue checking out code when using containers for my jobs. However, my setup is within Kubernetes. My pod has two containers, the runner and the docker in docker container used to run all docker commands/actions. The underlying file structure is shared through a set of volumes. Sure enough, my docker in docker container did not have the directory /actions-runner/
as you discovered above. I was able to use an initContainer to copy the data from the /actions-runner/
dir on the image to my shared volume. Once both the containers spun up, they each had access to the entirety of the /actions-runner/
directory. Confirmed code checkout then worked without a hitch 👍
initContainers:
- name: configure-actions-runner-dir
image: myoung34/github-runner:latest
command: ["/bin/bash", "-c"]
args:
- |
cp -R /actions-runner/* /actions-runner-volume/
securityContext:
runAsUser: 0
volumeMounts:
- mountPath: /actions-runner-volume/
name: actions-runner
from docker-github-actions-runner.
This is a question for the upstream actions team, this repo is only concerned with installing the runner itself
from docker-github-actions-runner.
Thanks for the hint, after some digging, it is the issue of job container creation.
In the "Initialize containers > Starting job container" step, by looking at the command that used to start a new container, we can notice that it mapped /actions-runner/externals
on my host machine to /__e
in the containers that runs the job, but /actions-runner/externals
only exists in the container that the runner was in, not on the host machine.
Raw text:
/usr/bin/docker create --name 7954e543b87540929d1873e3be523ef2_******dotnet_sdk_nodejs6020x_c0b4e8 --label c3f261 --workdir /__w/dotnet-cicd-eval/dotnet-cicd-eval --network github_network_69a556d20d5b4b48a1955f3b83e167b5 -e "HOME=/github/home" -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/tmp/runner/work_2":"/__w" -v "/actions-runner/externals":"/__e":ro -v "/tmp/runner/work_2/_temp":"/__w/_temp" -v "/tmp/runner/work_2/_actions":"/__w/_actions" -v "/opt/hostedtoolcache":"/__t" -v "/tmp/runner/work_2/_temp/_github_home":"/github/home" -v "/tmp/runner/work_2/_temp/_github_workflow":"/github/workflow" --entrypoint "tail" ******/dotnet_sdk_nodejs:6.0-20.x "-f" "/dev/null"
I have a possible workaround: looks like it is possible to override the path of volumes to be mapped into job containers by creating a json file. Maybe I can give it a try and report in the next few days.
from docker-github-actions-runner.
Related Issues (20)
- Cannot pull docker image HOT 1
- Dependency Dashboard
- Cannot connect to the Docker daemon HOT 11
- Run as helm chart HOT 2
- No space left on device HOT 6
- Latest bionic is broken with Glibc error HOT 2
- Use modern socket in Kubernetes YAML sample HOT 1
- Extremely slow? HOT 4
- Runner Name use ECS Task id/Container id HOT 1
- Q: "Full" runner images HOT 4
- Runner not showing up in Github but no errors HOT 3
- about the usage of docker-in-docker with github actions HOT 1
- [Clarification] JWT Authorization vs Github CLI HOT 2
- Missing `pkg-config` HOT 4
- Provide Ubuntu 22.04 Based Images HOT 10
- Customisation script and files in `/home/runner` HOT 5
- debian-sid missing libcurl3-gnutls
- Not able to run GH action in container (aarch64/arm64) HOT 1
- Powershell support HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docker-github-actions-runner.