Skip to content

GTN-Main/docker-github-runner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dockerized GitHub Runner (with cache support)

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.

Requirements

  • Docker
  • Docker Compose

Quick start

  1. Clone the repository:

    git clone https://github.com/GTN-Main/docker-github-runner.git
    cd docker-github-runner
  2. Copy the example environment file to .env:

    cp .env.example .env
  3. Fill the .env file with your data. Optionally you can assign additional labels with LABELS.

  4. Build and start the container:

    docker compose up -d --build

Important notes about volumes

  • /opt/runner-work must 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-work subdirectory on the main server itself.
  • unity-cache is 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.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors