-
Notifications
You must be signed in to change notification settings - Fork 962
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
Provide runner as a Docker Image #367
Comments
Some example of runner as a Docker image:
Additionally, Runner running in Docker is not able to use Docker itself:
This is a major downside, as we can not yet manage self hosted runners with Kubernetes for example, as we have to manage VMs or real machines. |
Thank you @vincentbrison for providing these examples, I found a couple of them as well, but I am not sure if we are allowed to use them in our company (we have a restriction to use only official images). Thats the reason why I asked here. :) The hint about docker in docker is useful (a couple of application suffer of this problem). 👍 |
I don't understand this limitation, what's the difference between this and a VM running in the machine? We are using M1 machines as our hosts and since the native runner on macOS does not support containers, we decided to use Docker, but when executing it, we get this error. |
Also its possible with docker to run a docker conatiner in a docker container. This page i found describes a bit better than me: https://www.docker.com/blog/docker-can-now-run-within-docker/ |
@scolastico did you manage to do this? |
not in this way but in another: https://github.com/scolastico-dev/s.RunnerManager |
are you able to run docker inside the docker container? |
Run docker inside docker: Yes with the link from above (https://www.docker.com/blog/docker-can-now-run-within-docker/). |
hi @nikola-jokic how do you use this image?
|
Hey @danm, You would need to provide an entrypoint. Keep in mind, the entrypoint should know how to configure and run the runner. The entrypoint by default does not exist. So imperatively, you can provide an |
Hi @nikola-jokic - thanks for providing those Dockerfiles - is there any plans to support docker in docker? We're in the process of migrating from Gitlab CI/CD to Github Actions and it seems quite agressive to run autoscaling VMs compared to running 1-2 dedicated machines that runs 5-10 instances (that are ephemeral) of that container. Either being able to use docker-in-docker, or having the agent support multiple workspaces on the same VM would both solve this. |
@danm did you get this runner working? @nikola-jokic - I'm afraid I am not entirely following - could you elaborate on what needs to be done for the entry point? If I understand this right, by using the dockerfile you link to we can create our own images to set up runners and manage these? Thanks in advance |
Hi @CarlSargunar Create a directory with 2 files, The Dockerfile could look like this... Dockerfile FROM ghcr.io/actions/actions-runner:latest
RUN sudo apt update -y && sudo apt install build-essential git curl -y
RUN curl -sL https://deb.nodesource.com/setup_16.x -o ./tmp/nodesource_setup.sh
RUN sudo chmod +x ./tmp/nodesource_setup.sh
RUN sudo ./tmp/nodesource_setup.sh
COPY ./runner.sh .
CMD ["./runner.sh"] runner.sh #!/bin/sh
./config.sh --url https://github.com/$REPO --token $TOKEN --name $NAME --unattended
sudo ./bin/runsvc.sh Run Though I don't think you are supposed to use |
For anyone stumbling upon this in future, this one command should be enough. Just replace the URL and token. ❯ docker run -it ghcr.io/actions/actions-runner:2.314.1 sh -c './config.sh --url https://github.com/<user or org>/<repo> --token <token> --unattended && ./run.sh' (use |
Describe the enhancement
Is it possible for you to provide official docker images for letting a runner run?
Additional information
We want to use self hosted runner, but we dont want to maintain machines/vms so it would be cool to have a ready to run official docker image in order to use them in services like aws fargate/azure container instances.
If im wrong here and I should have opened a topic in the github actions community forum please let me know and feel free to close the issue/feature request.
The text was updated successfully, but these errors were encountered: