Problem:
As I download and run containers, they keep taking up more and more space. I found suggestions for cleaning up unused containers and images and I did so. Guess what? They eat up even more disk space!
What I found so far:
It has to do with .docker\machine\machines\default\disk.vmdk
file. It only gets bigger!
Log of disk.vmdk:
size (MB) 1. with 2 images 1,376 2. downloading a new image X ? 3. running X as Y 2,963 4. removing Y 2,963 5. removing X 3,106 6. removing all the images 3,126
The only fix I found so far was running docker-machine rm default
which removes the VM. The problem is that I have to download all the images again. There should be a better fix. Can someone explain:
Volumes are removed using the docker volume rm command. You can also use the docker volume prune command.
There are maintainance commands you can run on the more recent versions of Docker. They will free up space used by stopped containers, dangling images and dangling volumes:
docker container prune -f docker image prune -f docker volume prune -f
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With