Skip to content

Instantly share code, notes, and snippets.

@jpe42
Created December 19, 2016 05:01
Show Gist options
  • Save jpe42/3c9a3c5d702e38acaf83ea4fdd6a3577 to your computer and use it in GitHub Desktop.
Save jpe42/3c9a3c5d702e38acaf83ea4fdd6a3577 to your computer and use it in GitHub Desktop.
Remove Docker Services
#!/bin/bash
#./rmServices.sh redis-cluster-m-
readonly FILTER=${1:-"redis-cluster-m-"}
docker service ls | grep "$FILTER" | awk '{print $1}' | xargs docker service rm
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment