Last active
September 1, 2023 01:28
-
-
Save michaellwest/e237b23367e54452a5d915ec7e8253f5 to your computer and use it in GitHub Desktop.
A convenient PowerShell script to list all the docker images and pull the from the registry.
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
docker image ls --format "{{json .Repository}},{{json .Tag}},{{json .ID}}" | | |
ConvertFrom-Csv -Header "Repository","Tag","Id" | | |
Where-Object { $_.Tag -ne "<none>" -and $_.Repository.Contains("/") } | | |
ForEach-Object { docker pull "$($_.Repository):$($_.Tag)"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Cleanup the unused layers after pulling the latest images.
docker image prune