Last active
July 15, 2020 20:53
-
-
Save sergiopvilar/ced1576b40cd26c08ada25418411c4c4 to your computer and use it in GitHub Desktop.
Aliases to stop docker containers and remove all images. Need to wipe all docker stuff? Run docker_purge
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
alias docker_cleanup_images="docker images | awk '{print $3}' | xargs docker rmi" | |
docker_cleanup() { | |
docker stop $(docker ps -a -q) | |
docker rm $(docker ps -a -q) | |
} | |
docker_purge() { | |
docker_cleanup | |
docker_cleanup_images | |
docker system prune --all --volumes -f | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment