Skip to content

Instantly share code, notes, and snippets.

@johnhout
Last active January 24, 2023 16:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save johnhout/75b6c7b45779f7eceffc5b467be20c82 to your computer and use it in GitHub Desktop.
Save johnhout/75b6c7b45779f7eceffc5b467be20c82 to your computer and use it in GitHub Desktop.
Docker snippets
# 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