From 6d04a924e3465ea8cb828e600173b9e04b5c2484 Mon Sep 17 00:00:00 2001 From: agentbox Date: Thu, 5 Nov 2026 11:45:17 +0000 Subject: [PATCH] Align inner runtime names with host: runsc-host and runsc-docker --- README.md | 22 +++++++++++----------- runner/daemon.json | 6 +++--- runner/start-sandboxed-dind.sh | 2 +- scripts/workflow-gvisor.yml | 2 +- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index b8091b6..505268c 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ act_runner container -> /var/run/docker.sock from the host with: ```text -Gitea -> act_runner -> private Docker daemon -> runsc -> CI job +Gitea -> act_runner -> private Docker daemon -> runsc-host -> CI job ``` Jobs that need Docker for e2e tests get a **separate, sandboxed Docker daemon**. @@ -27,8 +27,8 @@ physical host └── dind container [runc] Docker host at tcp://dind ├── gitea container [runc] └── runner container [runc] privileged - ├── job container [runsc] gVisor sandbox - └── gvisor-dind container [runsc-net] separate gVisor sandbox + ├── job container [runsc-host] gVisor sandbox + └── gvisor-dind container [runsc-docker] separate gVisor sandbox └── compose / e2e service container [runc] inside gvisor-dind's sandbox ``` @@ -60,13 +60,13 @@ have neither that socket nor a TCP API for it. ```json { - "default-runtime": "runsc", + "default-runtime": "runsc-host", "runtimes": { - "runsc": { + "runsc-host": { "path": "/usr/local/bin/runsc", "runtimeArgs": ["--platform=systrap", "--network=host"] }, - "runsc-net": { + "runsc-docker": { "path": "/usr/local/bin/runsc", "runtimeArgs": [ "--platform=systrap", @@ -78,10 +78,10 @@ have neither that socket nor a TCP API for it. } ``` -- `runsc` is used for CI jobs. Jobs share the runner network namespace so they +- `runsc-host` is used for CI jobs. Jobs share the runner network namespace so they can resolve `gitea` and reach the internet, but have no raw-socket or packet-write permission. -- `runsc-net` is used only for `gvisor-dind`. It uses gVisor's own network stack +- `runsc-docker` is used only for `gvisor-dind`. It uses gVisor's own network stack so Docker can create bridge networks inside its sandbox. Docker 28 needs raw sockets and packet writes there. - Both entries use the same `runsc` binary and `systrap` platform. They are not @@ -307,7 +307,7 @@ These are intentional but not invisible: 4. **Manual SNAT** — Docker iptables cannot initialize inside gVisor. 5. **Loopback TCP for the sandboxed daemon** — Unix socket files created inside a gVisor sandbox cannot usefully be shared through a Docker volume. -6. **Separate `runsc` / `runsc-net` runtimes** — Docker-in-gVisor needs raw +6. **Separate `runsc-host` / `runsc-docker` runtimes** — Docker-in-gVisor needs raw socket support and gVisor's own network stack, while jobs do not. 7. **Docker 28 pin** — avoids Docker 29 containerd-snapshotter/overlayfs incompatibilities. @@ -326,12 +326,12 @@ These are intentional but not invisible: ├── .env.example ├── runner/ │ ├── Dockerfile act_runner + runsc + sandboxed dind setup -│ ├── daemon.json runsc and runsc-net runtime entries +│ ├── daemon.json runsc-host and runsc-docker runtime entries │ ├── config.yaml labels, capacity, DOCKER_HOST │ ├── gvisor-entrypoint.sh cgroup setup, token fetch, gateway block │ ├── docker-run.sh runner dockerd, Unix socket only │ ├── act-runner-run.sh wait for Docker, start sandboxed daemon -│ ├── start-sandboxed-dind.sh launch gvisor-dind under runsc-net +│ ├── start-sandboxed-dind.sh launch gvisor-dind under runsc-docker │ └── start-dind.sh gVisor-aware dockerd startup + SNAT └── scripts/ ├── e2e-test.sh API-driven end-to-end test diff --git a/runner/daemon.json b/runner/daemon.json index c2e0bae..8d41703 100644 --- a/runner/daemon.json +++ b/runner/daemon.json @@ -1,14 +1,14 @@ { - "default-runtime": "runsc", + "default-runtime": "runsc-host", "runtimes": { - "runsc": { + "runsc-host": { "path": "/usr/local/bin/runsc", "runtimeArgs": [ "--platform=systrap", "--network=host" ] }, - "runsc-net": { + "runsc-docker": { "path": "/usr/local/bin/runsc", "runtimeArgs": [ "--platform=systrap", diff --git a/runner/start-sandboxed-dind.sh b/runner/start-sandboxed-dind.sh index 2bc9c3b..ebe4c98 100644 --- a/runner/start-sandboxed-dind.sh +++ b/runner/start-sandboxed-dind.sh @@ -11,7 +11,7 @@ docker rm -f gvisor-dind >/dev/null 2>&1 || true docker run -d \ --name gvisor-dind \ --restart unless-stopped \ - --runtime=runsc-net \ + --runtime=runsc-docker \ --privileged \ -p 127.0.0.1:2375:2375 \ -v gvisor-dind-data:/var/lib/docker \ diff --git a/scripts/workflow-gvisor.yml b/scripts/workflow-gvisor.yml index fa1fdef..a0e85f2 100644 --- a/scripts/workflow-gvisor.yml +++ b/scripts/workflow-gvisor.yml @@ -8,7 +8,7 @@ on: jobs: verify: # This label is mapped in runner/config.yaml to alpine:3.20. Every job - # container is created by the nested dockerd with default-runtime=runsc. + # container is created by the nested dockerd with default-runtime=runsc-host. runs-on: gvisor steps: - name: Prove the job runs on the gVisor kernel