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

+41
View File
@@ -198,6 +198,47 @@ environment:
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)
Short microbenchmarks with the disk-backed dind setup (`--no-overlay`, Docker