Docker has run out of disk space for images, containers, or volumes. Clean up unused Docker resources with docker system prune or expand your disk storage.
This error indicates that Docker cannot write data because the disk partition where Docker stores its data is full. Docker stores images, containers, volumes, and build cache in a data directory (typically `/var/lib/docker` on Linux). Over time, unused images, stopped containers, and dangling volumes accumulate and consume significant disk space. This is especially common in CI/CD environments or development machines where many images are pulled and built.
First, see how much space Docker is using:
docker system dfThis shows space used by images, containers, volumes, and build cache. The "RECLAIMABLE" column shows how much can be freed.
Clean up all unused Docker resources:
# Remove stopped containers, unused networks, dangling images
docker system prune
# Include unused volumes (careful - data loss possible)
docker system prune --volumes
# Remove ALL unused images, not just dangling ones
docker system prune -aWarning: --volumes removes volumes not attached to containers. Ensure you don't need that data.
If you want more control, remove images selectively:
# List all images with sizes
docker images -a
# Remove specific image
docker rmi <image_id>
# Remove all dangling images
docker image prune
# Remove images older than 24 hours
docker image prune -a --filter "until=24h"Build cache can grow very large with repeated builds:
# Remove all build cache
docker builder prune
# Remove build cache older than 24 hours
docker builder prune --filter "until=24h"
# See build cache usage
docker system df --verboseVerify the underlying disk has space:
df -h /var/lib/dockerIf the partition is nearly full even after Docker cleanup, you may need to expand the disk or move Docker's data directory.
If /var/lib/docker is on a small root partition, move it:
# Stop Docker
sudo systemctl stop docker
# Edit Docker daemon config
sudo nano /etc/docker/daemon.jsonAdd:
{
"data-root": "/path/to/new/docker-data"
}Then move the data and restart:
sudo mv /var/lib/docker /path/to/new/docker-data
sudo systemctl start dockerContainer Log Limits: Container logs can grow unbounded. Set limits in daemon.json:
{
"log-driver": "json-file",
"log-opts": {
"max-size": "10m",
"max-file": "3"
}
}Automated Cleanup: Consider running docker system prune -f in a daily cron job on CI/CD runners.
Docker Desktop: On macOS/Windows, Docker Desktop uses a virtual disk that can be resized in Settings → Resources → Disk image size.
unable to configure the Docker daemon with file /etc/docker/daemon.json
How to fix 'unable to configure the Docker daemon with file daemon.json' in Docker
docker: Error response from daemon: OCI runtime create failed: container_linux.go: starting container process caused: exec: "/docker-entrypoint.sh": stat /docker-entrypoint.sh: no such file or directory
How to fix 'exec: entrypoint.sh: no such file or directory' in Docker
image operating system "linux" cannot be used on this platform
How to fix 'image operating system linux cannot be used on this platform' in Docker
dockerfile parse error line 5: unknown instruction: RRUN
How to fix 'unknown instruction' Dockerfile parse error in Docker
manifest unknown: manifest unknown
How to fix 'manifest unknown' in Docker