Interview Prep/GitHub Actions/Caching, Artifacts, Builds & Scans

`System.IO.IOException: No space left on device` on a hosted runner during a Docker build.

IntermediateTroubleshootingCaching, Artifacts, Builds & Scans
Answer

Likely causes → Standard runners have about 14 GB free; large images, layer caches and test data exhaust it.

Diagnose → df -h and docker system df in a step.

Fix → Free space at the start (remove preinstalled toolchains you do not use):

sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc /opt/hostedtoolcache/CodeQL
docker system prune -af

or use a larger runner, or shrink the image with multi-stage builds.

Prevent → Track image size in CI and fail on regressions.

All GitHub Actions questions Roadmap: GitHub Actions

More on Caching, Artifacts, Builds & Scans