Align inner runtime names with host: runsc-host and runsc-docker

This commit is contained in:
agentbox committed 2026-11-05 11:45:17 +00:00
1 parent 6c14f5d76d
commit 6d04a924e3
4 files changed
+16 -16

No files matched your search

+11 -11
View File
@@ -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
+3 -3
View File
@@ -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",
+1 -1
View File
@@ -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 \
+1 -1
View File
@@ -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