Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Docker Pull/Update Images using PowerShell
# Pull all images
docker images --format "{{.Repository}}" | %{docker pull $_}
@sjbrouillard

This comment has been minimized.

Copy link

@sjbrouillard sjbrouillard commented Nov 15, 2017

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 $_}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.