mirror of
https://github.com/docker/docker-bench-security.git
synced 2025-06-23 23:29:09 +00:00
feat: add the ability to select the images to be check from registry in order to integrate in ci
Signed-off-by: Anthony Roger <aroger@softwaymedical.fr>
This commit is contained in:
parent
cc6b16d8a7
commit
1dd7956760
2 changed files with 17 additions and 2 deletions
|
@ -1,6 +1,19 @@
|
|||
#!/bin/sh
|
||||
|
||||
images=$(docker images -q)
|
||||
if [ -n "$imgList" ]; then
|
||||
pattern=$(echo "$imgList" | sed 's/,/ /g')
|
||||
for img in $pattern; do
|
||||
echo "Looking for image $img"
|
||||
sha256=$(docker image ls "$img" -q)
|
||||
if [ -z "$sha256" ]; then
|
||||
echo "Image $img not found. Exiting."
|
||||
exit 1
|
||||
fi
|
||||
images="$images $sha256 "
|
||||
done
|
||||
else
|
||||
images=$(docker images -q)
|
||||
fi
|
||||
|
||||
check_4() {
|
||||
logit "\n"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue