Last active
November 20, 2021 00:06
-
-
Save shoesCodeFor/541b93e511bfad8f9630ca43767ba03e to your computer and use it in GitHub Desktop.
Clean up docker - stop containers, remove containers and purge/delete 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
function clean_up_docker { | |
echo "Stopping all running containers" | |
docker stop $(docker ps -aq) | |
echo "Removing all containers" | |
docker rm $(docker ps -aq) | |
echo "Remove all images" | |
docker rmi $(docker images -q) | |
echo "Doesn't that feel better?! Have a lovely day" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment