Open mattfarina opened 2 years ago
This could be a tutorial
My disk just filled up while I was working on a Dockerfile and generating a ton of build cache without realizing it. Despite going through all the docker cleaning and pruning motions I could find, it didn't help. Turns out rancher-desktop was holding 85 gigs of my disk up with empty space?
It would be great if people didn't have to do a Factory Reset to free it.
@Enalmada Thanks for the inputs. I was wondering where all the space getting consumed. Now I found it.
@Enalmada holy hell I was wondering about this myself
Suffering this same issue rn after a heavy docker build
session.
docker images
shows only 4 small images, docker container ls -a
shows no stopped containers, and yet, within the VM /var/lib/docker/overlay2
is holding on to 88Gb.
Answer seems to be docker system prune
which deleted some 80Gb of build cache objects.
Update: docker builder du
and docker builder prune
are what's required here.
Suffering this same issue rn after a heavy
docker build
session.docker images
shows only 4 small images,docker container ls -a
shows no stopped containers, and yet, within the VM/var/lib/docker/overlay2
is holding on to 88Gb.Answer seems to be
docker system prune
which deleted some 80Gb of build cache objects.Update:
docker builder du
anddocker builder prune
are what's required here.
I'll try this next time. It's insane to get your C disk left with 200MB, and a factory reset to rancher desktop gives you back 50GB... There should be a one-click function or documentation somewhere that helps user solve this issues.
In the UI, look in Extensions
and install the Disk Usage
extension, this shows the same as docker system df
on the cli.
There's also a one-click Reclaim space
button
@edrandall: This issue seems to be Lima specific: Your proposal doesn't work to /lima/0/diffdisk
(on OS X).
The extension you mentioned works on the Docker level, the issue is the volume of the included VM itself...
@cmahnke I'm not sure I understand what you're saying. Please expand/explain what you're seeing.
The title of this issue is "how to cleanup images to free space" and the extension and docker [system|builder|image] prune
commands both achieve that. I'm also using OSX.
@edrandall: Ok, maybe I have confused the issues / discussions... https://github.com/rancher-sandbox/rancher-desktop/discussions/2871
There seem to be a regression.
When working with a lot of images it's not uncommon to run into disk space issues in the VM. Document how one can clean this up. There are a few methods including...