Last active
January 24, 2023 16:04
-
-
Save johnhout/75b6c7b45779f7eceffc5b467be20c82 to your computer and use it in GitHub Desktop.
Docker snippets
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
# Inlude in your .zshrc | |
removecontainers() { | |
docker stop $(docker ps -aq) | |
docker rm $(docker ps -aq) | |
} | |
armageddon() { | |
removecontainers | |
docker network prune -f | |
docker rmi -f $(docker images --filter dangling=true -qa) | |
docker volume rm $(docker volume ls --filter dangling=true -q) | |
docker rmi -f $(docker images -qa) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment