Created
August 29, 2014 02:24
-
-
Save martinheidegger/4fe7ea8673b36512f672 to your computer and use it in GitHub Desktop.
Small tool to remove all the docker images and containers that you once created and forgot about (I added this to ~/.zshrc)
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-gc() { | |
docker rm `docker ps -a -q` | |
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