5 ms·
I have no idea how, but Docker for Mac was taking up a whopping 65GB of space in one of the cache folders in ~/Library, although I had uninstalled it months ago
by thosakwe 7y ago
I have no idea how, but Docker for Mac was taking up a whopping 65GB of space in one of the cache folders in ~/Library, although I had uninstalled it months ago. I wish I had taken a screenshot, but I was honestly dumbfounded. I had used it maybe once, ever.
EDIT: It turns out I’m not making this up/an edge case, at least 940 people have run into this too: https://github.com/docker/for-mac/issues/371 https://github.com/docker/for-mac/issues/371
- etimberg 7y agoI have that problem too. Solution seemed to be to set up an alias to clean out old images, volumes, etc and run that every so often
- mirimir 7y agoNot just in MacOS. Over time, Docker can eat all your storage.
- jdnenej 7y agoBecause it keeps around all of the images you use as well as the containers after they are stopped so you can resume them. there is a command that auto automatically removes all unused images and containers you can use.
- mirimir 7y agoTrue. But there are situations where things get ~corrupted, and it becomes ~impossible to recover without basically nuking everything. But then, I was running containers with resource limits and long-term storage. So I could have thousands of lightweight "VMs" per physical server.
- dawnerd 7y agoThe issue linked is that is doesn't actually reclaim the space - you either have to wipe it out or do that workaround mentioned to resize it manually.
- wp381640 7y agothose scripts are now built into docker with `docker system prune`
- smudgymcscmudge 7y ago“docker system prune” is a recipe for pegging my cpu for the next few hours.
- wp381640 7y agoman nice
- thosakwe 7y agoFor those who downvoted this, I’m pretty sure GP is referring to the “nice” command line tool, used to give a task a certain priority: https://en.wikipedia.org/wiki/Nice_(Unix) https://en.wikipedia.org/wiki/Nice_(Unix)
- techntoke 7y agoIf that is the case then you likely have something misconfigured, or are running on seriously underpowered hardware or in a VM that needs more resources allocated to it.
- aledalgrande 7y agoIt used to be, with docker for Mac v2 it became fast for me. Problem is I don't wanna be wiping out dozens of images, figure out which ones I wanna keep etc. I want a configuration setting saying "keep X versions" and the rest will automatically get pruned.
- semerda 7y agoLittle changed after I ran this script. My ~/Library/Containers/com.docker.docker/ is a whopping 64.01 GB. Running 'docker system prune' only recovers: Total reclaimed space: 1.986GB But when I check ~/Library/Containers/com.docker.docker/ for size after prune it still says 64.01 GB. Am I doing something wrong or is 'docker system prune' useless?
- semerda 7y agoYap I confirm. 64 GB on my mac.. what da! Proof: https://www.flickr.com/photos/semerda/48720232588/ https://www.flickr.com/photos/semerda/48720232588/