Last active
July 4, 2017 02:10
-
-
Save tomgidden/37a6aa0a1fa5e8d37c51f08988c4ec0d to your computer and use it in GitHub Desktop.
Miscellaneous Docker and Gearman admin commands
This file contains hidden or 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
# 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