Created
January 8, 2019 14:40
-
-
Save ivuorinen/f4c9ba8ed193e8a9e32ff729f86d2028 to your computer and use it in GitHub Desktop.
Docker cleanup
This file contains hidden or 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/sh | |
for image in $(/usr/bin/docker images -q -f dangling=true); | |
do | |
/usr/bin/docker rmi $image; | |
done | |
for volume in $(/usr/bin/docker volume ls -qf dangling=true); | |
do | |
/usr/bin/docker volume rm $volume; | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment