Skaffold build "no space left on device" in CI
A Skaffold build writes image layers, cache, and context to the runner disk. When that disk fills, the underlying builder fails with "no space left on device" partway through, which Skaffold surfaces as a build failure.
What this error means
A build stops with "write ...: no space left on device" or "failed to copy: no space left on device" during a Docker or kaniko build stage.
building [my-app]: docker build failed: write /var/lib/docker/tmp/...: no space left on deviceCommon causes
Accumulated layers and cache fill the disk
Large base images, multiple artifacts, and leftover build cache exhaust the runner's limited disk.
A bloated build context
A context that includes large files not excluded by .dockerignore is copied into the daemon and consumes space.
How to fix it
Free disk before the build
- Prune unused Docker data at the start of the job.
- Shrink the build context with a tight .dockerignore.
- Re-run the build with more headroom.
docker system prune -af --volumes
df -hReduce what the build writes
Use smaller base images and multi-stage builds so fewer layers are written, and exclude large paths from the context.
# .dockerignore
node_modules
*.log
distHow to prevent it
- Prune Docker data before large builds in CI.
- Keep .dockerignore tight so the context stays small.
- Prefer multi-stage builds and slim base images.