Skip to content

Instantly share code, notes, and snippets.

@beeva-manueldepaz
Last active August 20, 2017 19:23
Show Gist options
  • Save beeva-manueldepaz/15c6c59b4b005db860af9b84dd64a358 to your computer and use it in GitHub Desktop.
Save beeva-manueldepaz/15c6c59b4b005db860af9b84dd64a358 to your computer and use it in GitHub Desktop.
Script to stop and delete current running containers (useful to work with DevLab) or even images (commented by default)
#!/bin/sh
# [DevLab](https://github.com/TechnologyAdvice/DevLab)
# $sudo mv /path/to/killAllContainers.sh /usr/local/bin/killAllContainers
# $sudo chmod a+x /usr/local/bin/killAllContainers
docker stop $(docker ps -a -q)
docker rm $(docker ps -a -q)
#docker rmi $(docker images -q)
#docker rmi $(docker images -q --filter "dangling=true")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment