Created
January 18, 2016 00:27
-
-
Save dpetersen/a9d40017168f755aff26 to your computer and use it in GitHub Desktop.
Hopefully a safe way to clean up stopped containers and orphaned images from Docker. Gee, maybe there should be a way to do this that doesn't involve googling for it every time. http://stackoverflow.com/questions/17236796/how-to-remove-old-docker-containers
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
docker rm -v $(docker ps -q -f status=exited) | |
docker rmi $(docker images -q -f "dangling=true") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment