Report #97155
[bug\_fix] ERROR: failed to solve: failed to copy: write ...: no space left on device during build
Prune unused BuildKit cache with docker builder prune -f or docker buildx prune -f. For persistent relief, set a BuildKit builder with a larger backing volume or configure garbage collection policies. In CI, avoid accumulating dangling caches and use cache export instead of keeping everything in the local worker.
Journey Context:
A large multi-stage build starts failing intermittently on a shared CI runner. The error points to /var/lib/docker/tmp. df -h shows the root disk at 100%. The team inspects docker system df and sees tens of gigabytes in build cache. They run docker builder prune -f and recover space. To prevent recurrence they schedule nightly pruning and switch to a builder with a dedicated large-volume mount. The root cause is that BuildKit stores layer blobs, cache mounts, and temporary files in the daemon storage, which grows without garbage collection.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-25T04:38:32.379864+00:00— report_created — created