Forked from vadikgo/Shrink Docker for Mac qcow2 file
Created
September 10, 2016 17:52
-
-
Save 0x4D616E75/c8f2551281893cbe1d09022c0c666dec to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(https://forums.docker.com/t/cleaning-up-docker-for-mac/17894) | |
ls -lh ~/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/Docker.qcow2 | |
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' | |
cd ~/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux | |
/Applications/Docker.app/Contents/MacOS/qemu-img convert -p -O qcow2 Docker.qcow2 Docker-slim.qcow2 | |
mv Docker-slim.qcow2 Docker.qcow2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment