Created
September 15, 2019 20:21
-
-
Save anselmobattisti/a5b6dc69a0e046a464738573074acf10 to your computer and use it in GitHub Desktop.
Stop all docker container by some patterns
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 stop $(docker ps | egrep alfa | awk '{print $1}') | |
in this case alfa is the name of the image used to start the container , you can use anything that apears in docker ps, like, name or others |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment