Use disk-backed dind storage by default
This commit is contained in:
1 parent
6f2c451187
commit
44b3e4bda6
2 files changed
+15
-15
No files matched your search
@@ -158,24 +158,24 @@ scripts/workflow-resource.yml disk / memory / CPU stress
|
|||||||
The dind image comes from the gVisor Docker-in-gVisor example under
|
The dind image comes from the gVisor Docker-in-gVisor example under
|
||||||
`gvisor/images/basic/docker`.
|
`gvisor/images/basic/docker`.
|
||||||
|
|
||||||
By default, `start-dockerd.sh` mounts a RAM-backed tmpfs at `/var/lib/docker`:
|
The default Compose configuration starts dind with:
|
||||||
|
|
||||||
```text
|
|
||||||
DOCKER_TMPFS_SIZE=5G
|
|
||||||
```
|
|
||||||
|
|
||||||
That is the gVisor-recommended path for Docker 29 overlayfs, but it limits
|
|
||||||
image/build storage to 5 GiB.
|
|
||||||
|
|
||||||
To use the disk-backed `./dind-data` volume instead, uncomment:
|
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
command: --no-overlay
|
command: --no-overlay
|
||||||
```
|
```
|
||||||
|
|
||||||
The startup script then disables Docker 29's containerd snapshotter so it can
|
This skips the RAM-backed tmpfs at `/var/lib/docker` and uses the disk-backed
|
||||||
fall back to a non-overlay storage path. Verify that the selected storage driver
|
`./dind-data` volume instead, so image/build storage is not capped at a fixed
|
||||||
works inside your gVisor version before relying on large builds.
|
tmpfs size. The startup script also disables Docker 29's containerd snapshotter
|
||||||
|
for this mode.
|
||||||
|
|
||||||
|
If you prefer a bounded RAM-backed store, remove `command: --no-overlay` and set
|
||||||
|
`DOCKER_TMPFS_SIZE` explicitly:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
environment:
|
||||||
|
DOCKER_TMPFS_SIZE: 5G
|
||||||
|
```
|
||||||
|
|
||||||
## Networking details
|
## Networking details
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -31,13 +31,13 @@ services:
|
|||||||
runtime: runsc-docker
|
runtime: runsc-docker
|
||||||
environment:
|
environment:
|
||||||
DOCKER_TLS_CERTDIR: ""
|
DOCKER_TLS_CERTDIR: ""
|
||||||
DOCKER_TMPFS_SIZE: 5G
|
|
||||||
cap_add:
|
cap_add:
|
||||||
- ALL
|
- ALL
|
||||||
volumes:
|
volumes:
|
||||||
- ./dind-data:/var/lib/docker
|
- ./dind-data:/var/lib/docker
|
||||||
- ./dind-runsc/resolv.conf:/etc/resolv.conf:ro
|
- ./dind-runsc/resolv.conf:/etc/resolv.conf:ro
|
||||||
#command: --no-overlay
|
# Use the disk-backed dind-data volume instead of a RAM-backed tmpfs.
|
||||||
|
command: --no-overlay
|
||||||
# No published TCP Docker API port.
|
# No published TCP Docker API port.
|
||||||
networks:
|
networks:
|
||||||
- ci
|
- ci
|
||||||
|
|||||||
Reference in new issue
Block a user