This project provides a Dockerized GitHub Actions runner that supports scaling, custom labels, runner groups, and Docker-in-Docker (DinD) for CI/CD workflows.
Clone this repo and copy .env.example to .env:
cp .env.example .envEdit .env and set:
GH_TOKEN— GitHub PAT with admin:org or repo scopeGITHUB_ORG— Your GitHub organization nameRUNNER_LABELS— (Optional) Comma-separated labels for your runner (e.g.yourname,team,customtag)RUNNER_GROUP— (Optional) Runner group name (must exist in your org)
docker compose up --build -ddocker compose up -d --scale github-runner=5The container mounts the host Docker socket (/var/run/docker.sock) so your jobs can run Docker commands inside the runner.
Set these in your .env file:
| Variable | Description |
|---|---|
| GH_TOKEN | GitHub PAT (admin:org or repo scope) |
| GITHUB_ORG | GitHub organization name |
| RUNNER_LABELS | (Optional) Comma-separated runner labels |
| RUNNER_GROUP | (Optional) Runner group name |
See the included docker-compose.yml file in this repository for the latest and recommended configuration example.
You can verify your token with:
curl -L -X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer {token}" \
https://api.github.com/orgs/{org}/actions/runners/registration-token- The runner name is randomized per instance.
- The container must run as root to access Docker socket.
- For repository-level runners, adjust the API endpoint and variables accordingly.