From fbc8dad1175e89884b7c50fa396cf19d71ce716a Mon Sep 17 00:00:00 2001 From: DongHyeonka Date: Wed, 11 Nov 2026 21:51:59 +0900 Subject: [PATCH] feat(host): cap the host Docker build cache The host Docker daemon had no daemon.json. The default BuildKit policy on this 228GiB disk keeps 21.42GiB of build cache untouched and allows 169.5GiB (docker buildx inspect default), so agent gate builds piled up about 23G in two days before the 2026-11-09 disk incident. Add infrastructure/host/docker/daemon.json with builder.gc defaultReservedSpace 5GB, defaultMaxUsedSpace 15GB and defaultMinFreeSpace 35GB. In Docker 29 the old defaultKeepStorage key means defaultReservedSpace, a floor and not a cap, so the cap is defaultMaxUsedSpace. 35GiB free is about 85% use, where the kubelet starts deleting images; below it the cache shrinks to the floor first. Moving the Docker data root to the HDD was rejected by the owner because builds get slower. Risk: applying needs sudo and a Docker restart, which restarts the runner, workmachine and cloudflared and fails running CI jobs and gates. The host apply guide added in this series says when that is safe. dockerd --validate does not check keys inside builder.gc, so the guide checks the live policy with docker buildx inspect. Verification: dockerd --validate passes for the file on Docker 29.6.1; it also passes a typo inside builder.gc and rejects an unknown top-level key, which is why the live check is in the guide. --- infrastructure/host/docker/daemon.json | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 infrastructure/host/docker/daemon.json diff --git a/infrastructure/host/docker/daemon.json b/infrastructure/host/docker/daemon.json new file mode 100644 index 0000000..8c52b50 --- /dev/null +++ b/infrastructure/host/docker/daemon.json @@ -0,0 +1,10 @@ +{ + "builder": { + "gc": { + "enabled": true, + "defaultReservedSpace": "5GB", + "defaultMaxUsedSpace": "15GB", + "defaultMinFreeSpace": "35GB" + } + } +}