No space left on device error

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