Created
February 12, 2021 19:40
-
-
Save steveendow/67d1d9d66b1e268d902aa9ef786b6a08 to your computer and use it in GitHub Desktop.
PowerShell Script to delete old BC Docker Images Except for base OS image
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 --format "{{.Repository}}\t{{.Tag}}\t{{.ID}}" | | |
Select-String "businesscentral" -notMatch | | |
ConvertFrom-CSV -Delimiter "`t" -Header ("Repository","Tag","ID") | | |
Sort-Object Tag | % ID | % { docker rmi $_ } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment