Created
January 24, 2017 10:19
-
-
Save ftorto/66b0ea5b11691d3553dc003dab1004de to your computer and use it in GitHub Desktop.
Remove useless docker images
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
# to add into .bashrc | |
clean_docker() { | |
# Delete all stopped container | |
docker rm $(docker ps -qa --no-trunc --filter "status=exited"); | |
# Delete intermediate images not referenced | |
docker rmi $(docker images --filter "dangling=true" -q --no-trunc) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment