Last active
April 24, 2017 23:57
-
-
Save lavie/0e92ee72ccb3b8a78534 to your computer and use it in GitHub Desktop.
Free disk space by deleting "stale" docker images (keep around the latest N tags of each image)
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 | |
images=$(./stale_image_tags.sh my.repo 3) | |
for image in $images; do | |
docker rmi $image | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment