37aca003ee17b529c69d5015f256daedd914d5e7
The previous fix (docker_host: tcp://dind:2375) was wrong: act_runner never passes DOCKER_HOST into job containers as an env var. It always bind-mounts container.docker_host (read from ITS OWN filesystem) into every job container as /var/run/docker.sock, and only recognizes unix:// (or bare) paths -- a tcp:// value is silently treated as unknown and falls back to a /var/run/docker.sock that doesn't exist in the runner container, which is exactly the "no such file or directory" error. Expose dind's daemon over an additional unix socket on a volume shared with the runner (dind-sock), and point docker_host at that shared path so the bind-mount act_runner performs actually resolves to dind's real socket. Verified by replicating act_runner's exact bind-mount pattern against the running stack: `docker -H tcp://dind:2375 run -v /dind-sock/docker.sock:/var/run/docker.sock ...` successfully ran `docker info` and `docker build` inside a nested container. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XFsukF6FzwBxJtRGzbt28F
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 thedind-storagevolume
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_NAMEand its own registration token. Rundocker compose down -vto fully reset (drops registration + caches).
Languages
Shell
100%