Skip to content

Instantly share code, notes, and snippets.

@mcbhenwood
Created March 2, 2016 10:53
Show Gist options
  • Save mcbhenwood/713115f41bcdbf55a249 to your computer and use it in GitHub Desktop.
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
#!/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