Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions tools/scan-images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,12 @@ rm -rf image-scan-output
mkdir -p image-scan-output

# Get built container images
docker image ls --filter "reference=ark.stackhpc.com/stackhpc-dev/*:$2*" > $1-scanned-container-images.txt
images=$(docker image ls \
--filter "reference=ark.stackhpc.com/stackhpc-dev/*:$2*" \
--format "{{.Repository}}:{{.Tag}}")

# 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:)
# Save list of images to file
echo "$images" > "$1-scanned-container-images.txt"

# Ensure output files exist
touch image-scan-output/clean-images.txt image-scan-output/dirty-images.txt image-scan-output/critical-images.txt
Expand Down
Loading