No space left on device error

Same issue, Docker.qcow2 is 18GB.

Docker version 1.12.0-rc2, build 906eacd, experimental

Same issue here, Docker.qcow2 is 19GB

Docker version is 1.12.0-rc2-beta17 (build: 9779) ff18c0c63c5ff3c4a4a925d191d5592d655779d7

This worked for me! .

Same issue. qcow2 file was 20+gb, so I removed it. Upon re-running my 2 (small!) containers, it ballooned back to 8gb and then stabilized. I upgraded to rc3 today and it then jumped to 14gb, where it’s now sitting.

Docker version 1.12.0-rc3, build 91e29e8, experimental

rm ~/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/Docker.qcow2
restart docker

Worked for me :thumbsup: :thumbsup:

2 Likes

Resize the image after it was created won’t work. You can check the result by running a df -h on any container: docker run --rm alpine df -h. You can see the space left remains the same (about 60G).

In order to increase the image storage.

  1. Create a new “template” image with desired size: qemu-img create -f qcow2 ~/data.qcow2 120G where the 120G is my new size.
  2. Replace the default docker template /Application/Docker.app/Contents/Resources/moby/data.qcow2 with your brand new ~/data.qcow2 (I’ve saved the original just in case)
    2.1 This data.qcow2 is the initial image which is copied to mentioned path ~/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/Docker.qcow2
  3. rm ~/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/Docker.qcow2
    3.1 Unfortunately you have to wipe all your docker data as stated before
  4. restart docker
  5. Check disk free: docker run --rm alpine df -h
1 Like

I deleted the file as described. However, I did an export of the images I wanted to retain before doing so. Then i imported the images after the delete. Worked great.

Same thing happened on one of my Linux boxes. So not strictly Mac related.

@quasiben’s suggestion worked perfectly:

1 Like

I have the same issue as above mentioned, tried thousands of things over the internet, no success!, as it turns out I changed my docker storage driver from devicemapper to aufs and everything now works like a charm.

I fixed this by manually removing some images. Use docker images to list all the images you have stored and docker rmi <image_name> to remove them. http://stackoverflow.com/a/30605040/4249632

I found that qemu-img was not already available on my machine. I was able to obtain it by brew install qemu.

You can use the one bundled with Docker.app. It’s in ‘/Applications/Docker.app/Contents/MacOS/qemu-img’

This worked like a charm for me. Thanks!

This method seems not to work for docker 1.13. The default template file doesn’t exist:

/Applications/Docker.app/Contents/Resources/moby
C02RR26LG8WP:moby GregoryBarron$ ls -l
total 120704
-rw-r–r-- 1 GregoryBarron admin 41 19 Jan 05:29 COMMIT
-rw-r–r-- 1 GregoryBarron admin 55400736 19 Jan 05:29 initrd.img
-rw-r–r-- 1 GregoryBarron admin 6391888 19 Jan 05:29 vmlinuz64
C02RR26LG8WP:moby GregoryBarron$

Having the same problem but resizing the image didn’t help :frowning:

But this command DID help!

docker rmi $(docker images | grep "^<none>" | awk "{print $3}")

Source: http://stackoverflow.com/questions/30604846/docker-error-no-space-left-on-device

1 Like

i delete this file and lose all my images ! :dizzy_face:

Thanx @murz.

That saved me!!

Worked like a charm.

The command
docker volume rm $(docker volume ls -qf dangling=true)
doesn’t work for me. I get
unknown shorthand flag: 'q' in -qf
See 'docker volume rm --help'.

Tried using --quiet with same results.

running Docker Version 17.03.1-ce-win5 (10743)

I too was having the issue about no space on device. What did work for me though was:
docker volume prune

2 Likes

Or

docker system prune -a

Docker version Version 17.05.0-ce-mac9

5 Likes