Created
May 28, 2017 19:07
-
-
Save gte445e/85119eb6e93bd46fb2bbd3e3a362ce68 to your computer and use it in GitHub Desktop.
Docker Pull/Update Images using PowerShell
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
# Pull all images | |
docker images --format "{{.Repository}}" | %{docker pull $_} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks for a great little gist. It's extremely helpful for cleanup.
I have one very small suggestion - pipe it through Where-Object to eliminate any dangling/intermediate images that might be hanging out from an attempted pull. Not a huge deal, just a small, incremental improvement, I think.
docker images --format "{{.Repository}}" | Where-Object {$_ -ne "<none>"} | %{docker pull $_}