Created
May 27, 2019 14:27
-
-
Save thedavecarroll/9533092676174b2721a06daf5b409f2b to your computer and use it in GitHub Desktop.
Update 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
$DockerImages = @{ | |
Path = 'function:global:Update-DockerImages' | |
Value = { | |
try { | |
Invoke-Expression -Command 'docker images --format "{{.Repository}}" | Where-Object {$_ -ne "<none>"} | Foreach-Object { docker pull $_ }' | |
} | |
catch { | |
Write-Error -ErrorRecord $_ | |
} | |
} | |
} | |
New-Item @DockerImages | Out-Null | |
New-Alias -Name 'udi' -Value Update-DockerImages |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can add this snippet to any of your PowerShell profiles to allow quick updates to all your docker images.