5 ms·
I 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
by etimberg 7y ago
I 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?
- fignews 7y agodocker prune -a is probably what you’re looking for. (I’m not responsible for data loss)
- chatmasta 7y agoThe 64GB is reserved space for the disk image. It doesn’t actually mean there is 64GB of data inside it. See here: https://docs.docker.com/docker-for-mac/space/ https://docs.docker.com/docker-for-mac/space/