Skip to content

Instantly share code, notes, and snippets.

@tomgidden
Last active July 4, 2017 02:10
Show Gist options
  • Save tomgidden/37a6aa0a1fa5e8d37c51f08988c4ec0d to your computer and use it in GitHub Desktop.
Save tomgidden/37a6aa0a1fa5e8d37c51f08988c4ec0d to your computer and use it in GitHub Desktop.
Miscellaneous Docker and Gearman admin commands
# Drop all unused Gearman jobs that match _v5
while (gearadmin --drop-function `gearadmin --status | cut -f 1 | grep _v5 | xargs`) {}
# Drop all unserved functions
while (gearadmin --status -h g1 | egrep "\\s+0$" | cut -f 1 | xargs gearadmin -h g1 --drop-function) {}
# Stop and delete all running Docker containers
docker rm -f $(docker ps -q)
# Remove all docker images
docker rmi $(docker images -q)
# Complete purge?
docker ps -q | xargs -r docker stop ; docker system purge -a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment