Created
June 8, 2017 20:53
-
-
Save VanDavv/04be4a6709380017388d8a816a97f4c7 to your computer and use it in GitHub Desktop.
One-liner to remove docker containers that returned with non 0 code
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 rm $(docker ps -a --format "table {{.ID}}\t{{.Status}}" | grep -v "Exited (0)" | awk '{print $1}' | grep -v "CONTAINER") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment