Align inner runtime names with host: runsc-host and runsc-docker
This commit is contained in:
1 parent
6c14f5d76d
commit
6d04a924e3
4 files changed
+16
-16
No files matched your search
@@ -12,7 +12,7 @@ act_runner container -> /var/run/docker.sock from the host
|
|||||||
with:
|
with:
|
||||||
|
|
||||||
```text
|
```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**.
|
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
|
└── dind container [runc] Docker host at tcp://dind
|
||||||
├── gitea container [runc]
|
├── gitea container [runc]
|
||||||
└── runner container [runc] privileged
|
└── runner container [runc] privileged
|
||||||
├── job container [runsc] gVisor sandbox
|
├── job container [runsc-host] gVisor sandbox
|
||||||
└── gvisor-dind container [runsc-net] separate gVisor sandbox
|
└── gvisor-dind container [runsc-docker] separate gVisor sandbox
|
||||||
└── compose / e2e service container [runc] inside gvisor-dind's 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
|
```json
|
||||||
{
|
{
|
||||||
"default-runtime": "runsc",
|
"default-runtime": "runsc-host",
|
||||||
"runtimes": {
|
"runtimes": {
|
||||||
"runsc": {
|
"runsc-host": {
|
||||||
"path": "/usr/local/bin/runsc",
|
"path": "/usr/local/bin/runsc",
|
||||||
"runtimeArgs": ["--platform=systrap", "--network=host"]
|
"runtimeArgs": ["--platform=systrap", "--network=host"]
|
||||||
},
|
},
|
||||||
"runsc-net": {
|
"runsc-docker": {
|
||||||
"path": "/usr/local/bin/runsc",
|
"path": "/usr/local/bin/runsc",
|
||||||
"runtimeArgs": [
|
"runtimeArgs": [
|
||||||
"--platform=systrap",
|
"--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
|
can resolve `gitea` and reach the internet, but have no raw-socket or
|
||||||
packet-write permission.
|
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
|
so Docker can create bridge networks inside its sandbox. Docker 28 needs raw
|
||||||
sockets and packet writes there.
|
sockets and packet writes there.
|
||||||
- Both entries use the same `runsc` binary and `systrap` platform. They are not
|
- 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.
|
4. **Manual SNAT** — Docker iptables cannot initialize inside gVisor.
|
||||||
5. **Loopback TCP for the sandboxed daemon** — Unix socket files created inside
|
5. **Loopback TCP for the sandboxed daemon** — Unix socket files created inside
|
||||||
a gVisor sandbox cannot usefully be shared through a Docker volume.
|
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.
|
socket support and gVisor's own network stack, while jobs do not.
|
||||||
7. **Docker 28 pin** — avoids Docker 29 containerd-snapshotter/overlayfs
|
7. **Docker 28 pin** — avoids Docker 29 containerd-snapshotter/overlayfs
|
||||||
incompatibilities.
|
incompatibilities.
|
||||||
@@ -326,12 +326,12 @@ These are intentional but not invisible:
|
|||||||
├── .env.example
|
├── .env.example
|
||||||
├── runner/
|
├── runner/
|
||||||
│ ├── Dockerfile act_runner + runsc + sandboxed dind setup
|
│ ├── 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
|
│ ├── config.yaml labels, capacity, DOCKER_HOST
|
||||||
│ ├── gvisor-entrypoint.sh cgroup setup, token fetch, gateway block
|
│ ├── gvisor-entrypoint.sh cgroup setup, token fetch, gateway block
|
||||||
│ ├── docker-run.sh runner dockerd, Unix socket only
|
│ ├── docker-run.sh runner dockerd, Unix socket only
|
||||||
│ ├── act-runner-run.sh wait for Docker, start sandboxed daemon
|
│ ├── 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
|
│ └── start-dind.sh gVisor-aware dockerd startup + SNAT
|
||||||
└── scripts/
|
└── scripts/
|
||||||
├── e2e-test.sh API-driven end-to-end test
|
├── e2e-test.sh API-driven end-to-end test
|
||||||
|
|||||||
+3
-3
@@ -1,14 +1,14 @@
|
|||||||
{
|
{
|
||||||
"default-runtime": "runsc",
|
"default-runtime": "runsc-host",
|
||||||
"runtimes": {
|
"runtimes": {
|
||||||
"runsc": {
|
"runsc-host": {
|
||||||
"path": "/usr/local/bin/runsc",
|
"path": "/usr/local/bin/runsc",
|
||||||
"runtimeArgs": [
|
"runtimeArgs": [
|
||||||
"--platform=systrap",
|
"--platform=systrap",
|
||||||
"--network=host"
|
"--network=host"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"runsc-net": {
|
"runsc-docker": {
|
||||||
"path": "/usr/local/bin/runsc",
|
"path": "/usr/local/bin/runsc",
|
||||||
"runtimeArgs": [
|
"runtimeArgs": [
|
||||||
"--platform=systrap",
|
"--platform=systrap",
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ docker rm -f gvisor-dind >/dev/null 2>&1 || true
|
|||||||
docker run -d \
|
docker run -d \
|
||||||
--name gvisor-dind \
|
--name gvisor-dind \
|
||||||
--restart unless-stopped \
|
--restart unless-stopped \
|
||||||
--runtime=runsc-net \
|
--runtime=runsc-docker \
|
||||||
--privileged \
|
--privileged \
|
||||||
-p 127.0.0.1:2375:2375 \
|
-p 127.0.0.1:2375:2375 \
|
||||||
-v gvisor-dind-data:/var/lib/docker \
|
-v gvisor-dind-data:/var/lib/docker \
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
verify:
|
verify:
|
||||||
# This label is mapped in runner/config.yaml to alpine:3.20. Every job
|
# 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
|
runs-on: gvisor
|
||||||
steps:
|
steps:
|
||||||
- name: Prove the job runs on the gVisor kernel
|
- name: Prove the job runs on the gVisor kernel
|
||||||
|
|||||||
Reference in new issue
Block a user