I am running very low on disk space (only 11G free of a 512G SSD drive). I need some more space for my development work.
One of the big files identified by the app CleanMyMac X
is this one: /Users/antkong/Library/Containers/com.docker.docker/Data/vms/0/data/Docker.raw
I have done a docker images
and they cannot add up to 64G
$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
zookeeper 3.4.14 ab94f52d366f 13 days ago 256MB
node 10 aa5532763c11 2 weeks ago 911MB
mongo 4 bcef5789979d 2 weeks ago 386MB
solr 6 0f559c1dfcc2 5 weeks ago 425MB
amazon/dynamodb-local latest 2908e432b67a 6 weeks ago 611MB
grokzen/redis-cluster latest 05627925dc7b 7 weeks ago 540MB
mysql-server 8.0 a7a38888d42d 8 weeks ago 381MB
redis 5.0.6 de25a823540b 4 months ago 98.2MB
solr 7.4.0 9a5ffdc62a3d 13 months ago 679MB
Is there any way I can reduce the size of this file?
I assume you've already tried running docker system prune
? That command will tell you it removes stopped containers, dangling images, and build cache from old images. The extra space could be from build cache and that wouldn't show up from the list of images.
This page gives more information about how Docker Desktop handles storage (from another commenter): Docker For Mac Storage
tldr: How you reduce the space Docker's using claiming on your system, from the docs: reduce maximum file size
If you want to get rid of persistent data as well, you can use:
docker system prune -a --volumes
One problem that you will still face is that the file size Docker.raw will start small, but keep increasing over a period of time due to disk activity. To avoid that, one trick that I usually do is to reduce the size to 8GB and increase it back to 32GB using Docker preferences.
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