Created
December 8, 2016 11:36
-
-
Save ColinLeverger/b87957eb2e2256646718f13d156e6982 to your computer and use it in GitHub Desktop.
Update all Docker 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
docker images | grep -v REPOSITORY | awk '{print $1}' | xargs -L1 docker pull |
Update images with current tag @hetykai:
docker images --format "{{.Repository}}:{{.Tag}}" | xargs -L1 docker pull
I have been using this one:
docker images --format "{{.Repository}}:{{.Tag}}" | grep --invert-match '<none>' | xargs -L1 docker pull
It removes the untagged images and pulls all by tag.
For PowerShell users this could be helpful:
docker images --format "{{.Repository}}:{{.Tag}}" | ForEach-Object { docker pull $_ }
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To update the docker images with the current tag use this command:
docker images | grep -v REPOSITORY | awk '{printf $1; printf ":"; print $2}' | xargs -L1 docker pull