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.
- Create a new “template” image with desired size:
qemu-img create -f qcow2 ~/data.qcow2 120G
where the 120G is my new size. - 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 - 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 - restart docker
- Check disk free:
docker run --rm alpine df -h