CI "docker pull" / "write blob: no space left on device" - Layer Disk Full
By Daniel Zoghalchali·Latchkey
A docker pull (or image build) failed writing a layer because the runner disk is full. Image layers are large, so pulling a few sizable images on a runner with accumulated layers is a common way to hit ENOSPC.
What this error means
A pull or build fails with failed to register layer: ... no space left on device or write /var/lib/docker/...: no space left on device. df -h shows the docker data filesystem at 100%. Pruning images, or using a bigger disk, resolves it.
CI log
failed to register layer: write /var/lib/docker/overlay2/.../diff/...:
no space left on device
Common causes
Accumulated image layers and build cache
On a reused runner, pulled images, dangling layers, and BuildKit cache pile up in the docker data root until a new pull cannot write its layers.
A single large image exceeds remaining space
Pulling a multi-gigabyte image on a runner with a small or already-used disk can exhaust it within one pull.
How to fix it
Check docker disk usage
See how much the docker data root is consuming and what is reclaimable.
Terminal
df -h
docker system df
Prune images and reclaim space
Remove unused images, layers, and build cache. Safe on a CI runner since the next job re-pulls what it needs.
Prune docker data at the start of jobs on long-lived runners.
Use runners with a docker data disk sized for your images and cache.
Pull only the image tags you need; avoid stacking many large images.
Frequently asked questions
What causes ""failed to register layer: no space left""?
On a reused runner, pulled images, dangling layers, and BuildKit cache pile up in the docker data root until a new pull cannot write its layers.
How do I fix "failed to register layer: no space left"?
See how much the docker data root is consuming and what is reclaimable.
Can Latchkey fix this automatically?
Yes. Latchkey runs your GitHub Actions on managed runners that detect this failure, apply the fix, and retry the job automatically - self-healing is on by default.