Docker Community Forums

Share and learn in the Docker community.

Docker no space left on device


this error show up when i try to pull elasticsearch


if any one have any idea please help

Docker engine uses /var/lib/docker to store the images and container runtime environment.

Looks like the disk mounted to /var/lib/docker is full. You can verify the size using the command du -sh /var/lib/docker.

Few options you have are -

  • Mount a disk with a good amount of space based on the number of images & applications you are running.

  • Remove unused images or stopped containers completely to obtain some free space.
    Few commands that helps are $ docker image rm <image-name/image-id> and $ docker container rm <container-name/container-id>

You can run a docker system prune --all --force command to do some cleanup.

$ docker system prune --help

Usage:	docker system prune [OPTIONS]

Remove unused data

  -a, --all             Remove all unused images not just dangling ones
      --filter filter   Provide filter values (e.g. 'label=<key>=<value>')
  -f, --force           Do not prompt for confirmation
      --volumes         Prune volumes
$ docker system prune --all
        - all stopped containers
        - all networks not used by at least one container
        - all dangling images
        - all dangling build cache

To skip the prompt:

docker system prune --all --force

To delete volumes currently not being used by a running or stopped container:

docker system prune --all --force --volumes

Also, that space could also be taken up by volumes.
Run a docker volume ls to see.

Does docker info | grep Filesystem return ext4?

Ext4 knows a different type of ‘no space left’, which occours if the filesystem has no entries left in the inode index. I have experienced inode exhaustion on ext4 formated filesystems in the past. Never had the problem with xfs (though, it needs to be formated with a special flag in order to work with overlay2 as sorage driver).