Skip to content

Instantly share code, notes, and snippets.

@juizmill
Forked from dz-s/docker-armageddon.sh
Created September 26, 2023 17:25
Show Gist options
  • Save juizmill/9ff8e64e8f6b0e4f99a2d022c186c5cb to your computer and use it in GitHub Desktop.
Save juizmill/9ff8e64e8f6b0e4f99a2d022c186c5cb to your computer and use it in GitHub Desktop.
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