Cleaning up Docker for Mac

Expected behavior

A way to clean up your DfM should be provided in the dropdown menus.
Logs should be cleaned up each restart.

Actual behavior

54G Docker.qcow2
64K console-ring
4.0K hypervisor.pid
0B lock
28G log

28G of log files is probably more than is useful, I have no instances and ~1.5G of container images.

Steps to reproduce the behavior

Use docker for a while :slight_smile:

I had thought this took a while, but I left the VM running one night and ended up with a full size qcow2 image.

Filling up empty space with zeroes (could be run from a container image):
$ docker run -it --rm -v /:/host alpine chroot /host /bin/sh -c 'dd if=/dev/zero of=/var/lost+found/zeroes; rm /var/lost+found/zeroes'
Freeing the space that was zeroed (with docker stopped):
$ qemu-img convert -O qcow2 Docker.qcow2 Docker-slim.qcow2
$ mv Docker-slim.qcow2 Docker.qcow2

Results:
-rw-r--r-- 1 faye.salwin staff 2258108416 Jul 20 16:31 Docker-slim.qcow2
-rw-r--r-- 1 faye.salwin staff 63834947584 Jul 20 16:28 Docker.qcow2