Added recent "exclude containers"-bugfix to the dc_brief.sh

This commit is contained in:
mag37
2023-07-11 23:05:34 +02:00
parent 6a3198eb08
commit f498138d4b

View File

@ -16,7 +16,8 @@ IFS=',' read -r -a Excludes <<< "$Exclude" ; unset IFS
SearchName="$1"
for i in $(docker ps --filter "name=$SearchName" --format '{{.Names}}') ; do
[[ " ${Excludes[*]} " =~ ${i} ]] && continue; # Skip if the container is excluded
for e in "${Excludes[@]}" ; do [[ "$i" == "$e" ]] && continue 2 ; done
# [[ " ${Excludes[*]} " =~ ${i} ]] && continue; # Skip if the container is excluded
printf ". "
RepoUrl=$(docker inspect "$i" --format='{{.Config.Image}}')
LocalHash=$(docker image inspect "$RepoUrl" --format '{{.RepoDigests}}')