We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8964ce1 commit d037355Copy full SHA for d037355
1 file changed
tools/scan-images.sh
@@ -21,10 +21,12 @@ rm -rf image-scan-output
21
mkdir -p image-scan-output
22
23
# Get built container images
24
-docker image ls --filter "reference=ark.stackhpc.com/stackhpc-dev/*:$2*" > $1-scanned-container-images.txt
+images=$(docker image ls \
25
+ --filter "reference=ark.stackhpc.com/stackhpc-dev/*:$2*" \
26
+ --format "{{.Repository}}:{{.Tag}}")
27
-# Make a file of imagename:tag
-images=$(grep --invert-match --no-filename ^REPOSITORY $1-scanned-container-images.txt | sed 's/ \+/:/g' | cut -f 1,2 -d:)
28
+# Save list of images to file
29
+echo "$images" > "$1-scanned-container-images.txt"
30
31
# Ensure output files exist
32
touch image-scan-output/clean-images.txt image-scan-output/dirty-images.txt image-scan-output/critical-images.txt
0 commit comments