Document and support file-capability xattrs in dind

This commit is contained in:
agentbox committed 2026-11-05 13:55:25 +00:00
1 parent 9fc7359cdc
commit d899f86182
3 files changed
+45

No files matched your search

+1
View File
@@ -1,6 +1,7 @@
.env .env
gitea/ gitea/
dind-data/ dind-data/
dind-overlay/
runner/.runner runner/.runner
runner/.cache/ runner/.cache/
*.log *.log
+41
View File
@@ -198,6 +198,47 @@ environment:
DOCKER_TMPFS_SIZE: 5G DOCKER_TMPFS_SIZE: 5G
``` ```
### Image pull fails with `security.capability` / `lsetxattr`
Example:
```text
failed to register layer: lsetxattr /usr/bin/ping:
xattr "security.capability": operation not supported
```
This is not a registry or authentication problem. gVisor's host-backed
filesystem path cannot set the `security.capability` xattr on files such as
`/usr/bin/ping`, which many Ubuntu runner images contain.
The disk-backed dind setup needs an overlay filestore to support those xattrs.
Add this to the host's `runsc-docker` runtime:
```json
"runsc-docker": {
"path": "/usr/bin/runsc",
"runtimeArgs": [
"--net-raw",
"--allow-packet-socket-write",
"--overlay2=all:dir=/var/lib/gvisor-overlay"
]
}
```
The Compose file mounts:
```text
./dind-overlay -> /var/lib/gvisor-overlay
```
With that runtime argument, Docker inside the sandbox may report the `vfs`
storage driver rather than overlay2, but image pulls with file capabilities work
and storage remains disk-backed.
Without this host runtime change, the working alternative is the RAM-backed
tmpfs mode above. The error is a gVisor filesystem/xattr limitation, not a
runner-image label or Compose volume problem.
## Performance (local test) ## Performance (local test)
Short microbenchmarks with the disk-backed dind setup (`--no-overlay`, Docker Short microbenchmarks with the disk-backed dind setup (`--no-overlay`, Docker
+3
View File
@@ -35,6 +35,9 @@ services:
- ALL - ALL
volumes: volumes:
- ./dind-data:/var/lib/docker - ./dind-data:/var/lib/docker
# Used by runsc --overlay2=all:dir=... to support file-capability xattrs
# on host-backed image layers. See README.
- ./dind-overlay:/var/lib/gvisor-overlay
- ./dind-runsc/resolv.conf:/etc/resolv.conf:ro - ./dind-runsc/resolv.conf:/etc/resolv.conf:ro
# Use the disk-backed dind-data volume instead of a RAM-backed tmpfs. # Use the disk-backed dind-data volume instead of a RAM-backed tmpfs.
command: --no-overlay command: --no-overlay