Skip to content

Commit 44e4092

Browse files
Alex-Welshdougszumski
authored andcommitted
Fix docker image ls output (#2000)
1 parent 8964ce1 commit 44e4092

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

tools/scan-images.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,14 @@ rm -rf image-scan-output
2121
mkdir -p image-scan-output
2222

2323
# Get built container images
24-
docker image ls --filter "reference=ark.stackhpc.com/stackhpc-dev/*:$2*" > $1-scanned-container-images.txt
24+
output_file="$1-scanned-container-images.txt"
25+
26+
docker image ls \
27+
--filter "reference=ark.stackhpc.com/stackhpc-dev/*:$2*" \
28+
--format "{{.Repository}}:{{.Tag}}" \
29+
> "$output_file"
30+
31+
cat "$output_file"
2532

2633
# Make a file of imagename:tag
2734
images=$(grep --invert-match --no-filename ^REPOSITORY $1-scanned-container-images.txt | sed 's/ \+/:/g' | cut -f 1,2 -d:)

0 commit comments

Comments
 (0)