Skip to content

Instantly share code, notes, and snippets.

@tfrisk-old
Created July 24, 2017 11:51
Show Gist options
  • Save tfrisk-old/5eb6c206c29c9d9ec4cd77e4c2f9fbb4 to your computer and use it in GitHub Desktop.
Save tfrisk-old/5eb6c206c29c9d9ec4cd77e4c2f9fbb4 to your computer and use it in GitHub Desktop.
Stop docker
#!/bin/sh
# Older docker which does not have prune command
#
# Stop all containers
docker stop $(docker ps -a -q)
# Delete all containers
docker rm $(docker ps -a -q)
# Delete all images
docker rmi $(docker images -q)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment