Created
May 15, 2017 14:06
-
-
Save josellausas/7570cdce0375ee5e07cb2a49e044d9dd to your computer and use it in GitHub Desktop.
Cleans docker stale obects.
This file contains hidden or 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
#!/usr/bin/env bash | |
# Remove dangling images | |
docker rmi $(docker images -f dangling=true -q) | |
# Remove all exited containers | |
docker rm $(docker ps -a -f status=exited -q) | |
# Remove dangling volumes | |
docker volume rm $(docker volume ls -f dangling=true -q) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment