Created
August 20, 2014 14:14
-
-
Save nhoening/136e76c73975e6792596 to your computer and use it in GitHub Desktop.
stop and remove all docker containers, don't fail if there are none (good for jenkins)
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
if [ "$(docker ps | wc -l)" == "1" ]; then docker stop $(docker ps -a); fi | |
if [ "$(docker ps -a | wc -l)" == "1" ]; then docker rm $(docker ps -a); fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment