Skip to content

Instantly share code, notes, and snippets.

@chapov
Forked from dz-s/docker-armageddon.sh
Created March 6, 2023 08:42
Show Gist options
  • Save chapov/62603adae8e855aec19a9283b940e15a to your computer and use it in GitHub Desktop.
Save chapov/62603adae8e855aec19a9283b940e15a 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