mirror of
https://github.com/mag37/dockcheck.git
synced 2026-02-14 23:38:15 +01:00
changed local image check to reference ID instead of image-name
This commit is contained in:
parent
cce5438aca
commit
15ce226a0a
1 changed files with 2 additions and 1 deletions
|
|
@ -284,8 +284,9 @@ for i in $(docker ps $Stopped --filter "name=$SearchName" --format '{{.Names}}')
|
|||
progress_bar "$RegCheckQue" "$ContCount"
|
||||
# Looping every item over the list of excluded names and skipping
|
||||
for e in "${Excludes[@]}" ; do [[ "$i" == "$e" ]] && continue 2 ; done
|
||||
ImageId=$(docker inspect "$i" --format='{{.Image}}')
|
||||
RepoUrl=$(docker inspect "$i" --format='{{.Config.Image}}')
|
||||
LocalHash=$(docker image inspect "$RepoUrl" --format '{{.RepoDigests}}')
|
||||
LocalHash=$(docker image inspect "$ImageId" --format '{{.RepoDigests}}')
|
||||
# Checking for errors while setting the variable
|
||||
if RegHash=$(${t_out} $regbin -v error image digest --list "$RepoUrl" 2>&1) ; then
|
||||
if [[ "$LocalHash" = *"$RegHash"* ]] ; then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue