Created
November 30, 2018 10:15
-
-
Save shmaltorhbooks/8036bb3c02396ac07740f3f3e1d92817 to your computer and use it in GitHub Desktop.
docker cache
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
# cleans all dangling images. This is useful for removing intermediate images left over from multiple builds | |
alias docker_clean_images='docker rmi $(docker images -a --filter=dangling=true -q)' | |
# for removing stopped containers | |
alias docker_clean_ps='docker rm $(docker ps --filter=status=exited --filter=status=created -q)' | |
# This would kill and remove all images in your cache | |
docker kill $(docker ps -q) | |
docker_clean_ps | |
docker rmi $(docker images -a -q) | |
docker system prune -a |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment