Last active
February 27, 2017 05:00
-
-
Save j138/45769c2631bb260fc94a978522e015b3 to your computer and use it in GitHub Desktop.
docker for Mac対象でディスク削減 ref: http://qiita.com/Jey/items/0157e689fb1f428a6e6d
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
#!/bin/bash | |
echo y | docker system prune | |
cd ~/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux || exit | |
mv Docker.qcow2 Docker.qcow2.org | |
qemu-img convert -O qcow2 Docker.qcow2.org Docker.qcow2 | |
ls -lh Docker.qcow2 Docker.qcow2.org | |
rm Docker.qcow2.org |
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
./docker-disk-optimize.sh | |
WARNING! This will remove: | |
- all stopped containers | |
- all volumes not used by at least one container | |
- all networks not used by at least one container | |
- all dangling images | |
Are you sure you want to continue? [y/N] Total reclaimed space: 4.21 GB | |
-rw-r--r-- 1 t00114 CATK\Domain Users 7.9G 2 27 13:45 Docker.qcow2 | |
-rw-r--r-- 1 t00114 CATK\Domain Users 16.2G 2 27 13:33 Docker.qcow2.org |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment