diff --git a/images/linux/scripts/SoftwareReport/SoftwareReport.Common.psm1 b/images/linux/scripts/SoftwareReport/SoftwareReport.Common.psm1 index 1989caf4b..15a19653c 100644 --- a/images/linux/scripts/SoftwareReport/SoftwareReport.Common.psm1 +++ b/images/linux/scripts/SoftwareReport/SoftwareReport.Common.psm1 @@ -240,6 +240,17 @@ function Get-CachedDockerImages { return $images } +function Get-CachedDockerImagesTableData { + return (sudo 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] + } + } +} + function Get-AptPackages { $toolsetJson = Get-ToolsetContent $apt = $toolsetJson.apt @@ -252,4 +263,4 @@ function Get-PipxVersion { $result -match "(?\d+\.\d+\.\d+\.?\d*)" | Out-Null $pipxVersion = $Matches.Version return "Pipx $pipxVersion" -} \ No newline at end of file +} diff --git a/images/linux/scripts/SoftwareReport/SoftwareReport.Generator.ps1 b/images/linux/scripts/SoftwareReport/SoftwareReport.Generator.ps1 index df77ea23b..9cf57034a 100644 --- a/images/linux/scripts/SoftwareReport/SoftwareReport.Generator.ps1 +++ b/images/linux/scripts/SoftwareReport/SoftwareReport.Generator.ps1 @@ -224,7 +224,8 @@ $markdown += Build-AndroidTable | New-MDTable $markdown += New-MDNewLine $markdown += New-MDHeader "Cached Docker images" -Level 3 -$markdown += New-MDList -Style Unordered -Lines @(Get-CachedDockerImages) +$markdown += Get-CachedDockerImagesTableData | New-MDTable +$markdown += New-MDNewLine $markdown += New-MDHeader "Installed apt packages" -Level 3 $markdown += New-MDList -Style Unordered -Lines @(Get-AptPackages)