Sort docker images by name in documentation (#2716)

Sort docker images by name in documentation
This commit is contained in:
Maxim Lobanov
2021-02-16 09:56:14 +03:00
committed by GitHub
parent c87b27a593
commit 337ff74101
2 changed files with 18 additions and 16 deletions

View File

@@ -294,14 +294,15 @@ function Get-CachedDockerImages {
}
function Get-CachedDockerImagesTableData {
return (docker images --digests --format "*{{.Repository}}:{{.Tag}}|{{.Digest}} |{{.CreatedAt}}").Split("*") | Where-Object { $_ } | ForEach-Object {
$parts=$_.Split("|")
[PSCustomObject] @{
"Repository:Tag" = $parts[0]
"Digest" = $parts[1]
"Created" = $parts[2].split(' ')[0]
}
}
$allImages = docker images --digests --format "*{{.Repository}}:{{.Tag}}|{{.Digest}} |{{.CreatedAt}}"
$allImages.Split("*") | Where-Object { $_ } | ForEach-Object {
$parts = $_.Split("|")
[PSCustomObject] @{
"Repository:Tag" = $parts[0]
"Digest" = $parts[1]
"Created" = $parts[2].split(' ')[0]
}
} | Sort-Object -Property "Repository:Tag"
}
function Get-ShellTarget {