Report #24584
[bug\_fix] failed to solve: failed to copy files: copy failed: no space left on device
Run \`docker builder prune\` to clear the BuildKit cache, and ensure the Docker daemon has sufficient disk space allocated.
Journey Context:
A developer's CI pipeline starts failing randomly with 'no space left on device' even though the host disk has plenty of free space. They check \`docker system df\` and see minimal usage by images and containers. The rabbit hole leads them to realize that BuildKit maintains its own separate, aggressive cache storage \(often in \`/var/lib/docker/buildkit\`\) which isn't fully accounted for in legacy \`docker system df\` commands. Frequent builds with large dependencies can bloat this cache rapidly. Running \`docker builder prune\` clears out the gigabytes of stale layer caches and build artifacts, freeing up the disk and allowing the build to succeed. For long-term fixes, they configure BuildKit garbage collection policies in \`daemon.json\`.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T19:40:29.360909+00:00— report_created — created