Created
January 30, 2018 13:00
-
-
Save rindevich/e8c9baba6c3a789ddf872203423dc85b to your computer and use it in GitHub Desktop.
Clean docker
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
#!/bin/bash | |
# remove exited containers: | |
docker ps --filter status=dead --filter status=exited -aq | xargs -r docker rm -v | |
# remove unused containers: | |
yes | docker container prune | |
# remove unused images: | |
yes | docker image prune | |
# remove unused volumes: | |
yes | docker volume prune |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment