From 37d58e5779a2282119395f93f5ed8d5e97ac15dc Mon Sep 17 00:00:00 2001 From: qiaofeng1227 <76487013@qq.com> Date: Wed, 27 Jul 2022 11:52:50 +0800 Subject: [PATCH] Update containers_version.sh --- scripts/containers_version.sh | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/scripts/containers_version.sh b/scripts/containers_version.sh index 3f2ea8d5..bef32dfd 100644 --- a/scripts/containers_version.sh +++ b/scripts/containers_version.sh @@ -28,7 +28,18 @@ for appinfo in $(docker ps --format '{{.Names}}%{{.Image}}'); do wget -O /tmp/"$appname"_get_version.sh https://raw.githubusercontent.com/Websoft9/docker-$appname/main/src/get_version.sh bash /tmp/"$appname"_get_version.sh $containername break - elif [[ $imagename =~ $appname ]];then + fi + done +done + +for appinfo in $(docker ps --format '{{.Names}}%{{.Image}}'); do + + containername=$(echo $appinfo |awk -F"%" '{print $1}') + imagename=$(echo $appinfo |awk -F"%" '{print $2}') + + for appname in $appnames; do + + if [[ $imagename =~ $appname ]];then if [[ $targetlist =~ $appname ]];then continue fi