From 20dfd7a9d9642fbfce03dd1c7d000e260033e9f8 Mon Sep 17 00:00:00 2001 From: Alex Welsh Date: Tue, 25 Nov 2025 09:54:04 +0000 Subject: [PATCH] Fix docker image ls output --- tools/scan-images.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tools/scan-images.sh b/tools/scan-images.sh index ca31350fb8..e8b35b742a 100755 --- a/tools/scan-images.sh +++ b/tools/scan-images.sh @@ -45,8 +45,14 @@ file_prep() { # Gather image lists get_images() { - docker image ls --filter "reference=ark.stackhpc.com/stackhpc-dev/*:$2*" > $1-scanned-container-images.txt - grep --invert-match --no-filename ^REPOSITORY $1-scanned-container-images.txt | sed 's/ \+/:/g' | cut -f 1,2 -d: + local output_file="$1-scanned-container-images.txt" + + docker image ls \ + --filter "reference=ark.stackhpc.com/stackhpc-dev/*:$2*" \ + --format "{{.Repository}}:{{.Tag}}" \ + > "$output_file" + + cat "$output_file" } # Generate ignored vulnerabilities file