Created
March 2, 2016 10:53
-
-
Save mcbhenwood/713115f41bcdbf55a249 to your computer and use it in GitHub Desktop.
Bash shortcut to grep running Docker container names and stop then remove any which match
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
#!/bin/bash | |
docker rm $( docker stop $(docker ps -a | grep $1 | awk '{ print $1; }')) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment