Simple and easy-to-deploy container image with GitHub Runner. Supports docker-out-of-docker (via docker.sock mapping) which is crucial for modern CI/CD, and also has a prepared separate cache volume for Unity projects. Useful for self-hosting your GitHub Actions runners on Windows machines, since it allows you to run Linux-based runners without the need for any additional virtualization software and provides better isolation and security compared to running the runner directly on the host.
We use this image in tandem with self-hosted GitHub Actions server as an additional runner that speeds up CI/CD when our PCs are on.
Pairs ideally with GTN-Main/actions repository, which contains a set of pre-made reusable workflows for Unity projects. The cache volume in this image is configured to work seamlessly with the caching system from that repository.
- Docker
- Docker Compose
-
Clone the repository:
git clone https://github.com/GTN-Main/docker-github-runner.git cd docker-github-runner -
Copy the example environment file to
.env:cp .env.example .env
-
Fill the
.envfile with your data. Optionally you can assign additional labels withLABELS. -
Build and start the container:
docker compose up -d --build
/opt/runner-workmust be mapped as a fixed path on the host (this is required for proper functioning of DooD). By default, Docker will create the/opt/runner-worksubdirectory on the main server itself.unity-cacheis a dedicated volume you can use to store your CI/CD cache. The name comes from unity actions ecosystem we created it for, but you can use it for any other caching purposes as well.