ENOSPC 🐳 Docker

no space left on device (Docker / Linux)

The disk (or inode table) is full — Docker images, build cache, logs and volumes are common culprits.

Seen on: Docker Linux

Meaning

Writes fail once the filesystem is full. Docker accumulates unused images, stopped containers, build cache and unbounded container logs over time.

Common causes

  • Unused images/containers/build cache
  • Huge container logs (json-file driver without rotation)
  • Volumes with growing data
  • Inodes exhausted by many small files

⚡ Quick fix

  1. Check usage: docker system df and df -h / df -i
  2. Clean up: docker system prune (add -a --volumes carefully)
  3. Rotate logs: set max-size / max-file in daemon.json

Detailed fix by platform

Docker

  1. Log rotation in /etc/docker/daemon.json:
    json
    {
      "log-driver": "json-file",
      "log-opts": { "max-size": "10m", "max-file": "3" }
    }

Linux

  1. sudo du -xh / --max-depth=2 | sort -h | tail -20 to find what’s large.

How to diagnose

  1. Space — df -h — which filesystem?
  2. Inodes — df -i
  3. Docker — docker system df

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.