Last active
August 29, 2015 14:21
-
-
Save jazzwang/7b5b13cd52d715fe7abf to your computer and use it in GitHub Desktop.
Docker Tricks (1) : update your local docker images from registry and remove old 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
#!/bin/bash | |
for i in $(docker images | grep ago | awk '{ print $1":"$2 }'); do docker pull $i; done | |
for i in $(docker images -f 'dangling=true' -q); do docker rmi $i; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment