Report #10799
[bug\_fix] No space left on device during Docker build
Add a step to run \`docker system prune -f\` or use the official \`actions/runner-images\` cleanup scripts \(like \`rm -rf /opt/hostedtoolcache\` or similar\) to free up the 14GB SSD space on GitHub-hosted runners.
Journey Context:
A CI workflow builds a large Docker image with multiple stages, pulling several base images. Suddenly, builds fail mid-way with "write /var/lib/docker/tmp/...: no space left on device" or "ERROR: failed to solve: failed to register layer: write ... no space left on device". The developer first suspects the Docker image itself is too large, but \`docker images\` shows reasonable sizes. They check \`df -h\` and discover the root filesystem is 100% full. They realize GitHub-hosted runners only provide 14GB of SSD space, shared between the OS, tool caches, and Docker layers. Previously, the build worked because Docker cache was warm or images were smaller. The fix works because \`docker system prune -f\` removes dangling images, stopped containers, and build cache not associated with tagged images, immediately reclaiming gigabytes of space. Alternatively, removing the pre-installed tool cache \(\`/opt/hostedtoolcache\`\) frees up additional space used by unused language versions \(Python, Node, etc.\), allowing the Docker build to proceed within the 14GB constraint.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T11:43:36.219921+00:00— report_created — created