Created
December 17, 2018 15:56
-
-
Save samsulmaarif/58b173315b35ae33b24b2a8159155d71 to your computer and use it in GitHub Desktop.
Cleaning Up Docker stuff (image, volume, container)
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
#!/bin/bash | |
#docker ps -a | awk -F' ' '{print $1}' | grep -v CONTAINER | xargs docker rm | |
docker ps --all -q -f status=exited | xargs docker rm | |
docker images | awk -F' ' '{print $3}' | xargs docker rmi | |
docker volume ls -qf dangling=true | xargs -r docker volume rm |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment