Last active
December 14, 2017 10:30
-
-
Save zinovyev/cc1e71c9b85d5d0839f94060031f55c5 to your computer and use it in GitHub Desktop.
Remove docker containers with duplicating images
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 ps -a | grep -v "Up" | sort -k2 | awk '{ if (prev_image==$2) { print "docker rm -f "$1 } ; prev_image=$2 }' | bash |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment