nampdnandClaude Sonnet 5 88d5c6d2f5 Fix job containers unable to reach DinD daemon for direct docker commands
docker_host: "-" was disabling docker access in job containers entirely,
so steps running `docker build`/`docker` directly had no daemon to talk
to. Point docker_host at the dind sibling and add a host-gateway entry
so the "dind" hostname resolves inside job containers, which run nested
on dind's own internal bridge network rather than the outer compose one.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XFsukF6FzwBxJtRGzbt28F
2026-07-03 15:56:03 +07:00

Gitea Act Runner (DinD + cache)

Stable Gitea Actions runner for building Rust projects. Runs jobs in an isolated Docker-in-Docker daemon with the built-in cache server enabled and multiple parallel jobs.

Setup on a new build machine

Requires Docker + Docker Compose.

cp .env.example .env
# edit .env: set GITEA_RUNNER_NAME (unique per machine) and a fresh
# GITEA_RUNNER_REGISTRATION_TOKEN from Gitea -> Actions -> Runners -> Create Runner
docker compose up -d

Verify:

docker compose ps                            # both containers up, dind healthy
docker logs gitea-runner-wsl 2>&1 | tail     # "declare successfully"

Config

  • Parallel jobs: config.yaml -> runner.capacity (default 4)
  • Job images: config.yaml -> runner.labels (ubuntu-latest/22.04/24.04)
  • Cache: enabled in config.yaml; layer cache persists in the dind-storage volume

Rust workflows

Copy example-rust-workflow.yaml to your repo at .gitea/workflows/build.yaml. It uses actions-rust-lang/setup-rust-toolchain which caches ~/.cargo and target/ via the runner's cache server.

Manage

docker compose up -d      # apply config changes
docker compose down       # stop (registration persists in volume)
docker compose pull       # update runner/dind images

Each machine needs a unique GITEA_RUNNER_NAME and its own registration token. Run docker compose down -v to fully reset (drops registration + caches).

S
Description
No description provided
Readme
54 KiB
Languages
Shell 100%