From 22522c8a5c20829981d32b2bcf43257a9ab850bb Mon Sep 17 00:00:00 2001 From: xuwei-fit2cloud Date: Tue, 23 Jan 2024 19:08:24 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E9=95=9C=E5=83=8F=E6=9C=AA?= =?UTF-8?q?=E5=8F=98=E5=8C=96=E6=97=B6=EF=BC=8C=E5=8D=87=E7=BA=A7=E5=AE=89?= =?UTF-8?q?=E8=A3=85=E4=B8=8D=E9=87=8D=E5=A4=8D=E5=8A=A0=E8=BD=BD=E9=95=9C?= =?UTF-8?q?=E5=83=8F=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- installer/install.sh | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/installer/install.sh b/installer/install.sh index 9b3f33e441..7111eff777 100644 --- a/installer/install.sh +++ b/installer/install.sh @@ -48,6 +48,14 @@ DE_RUN_BASE=$DE_BASE/dataease2.0 conf_folder=${DE_RUN_BASE}/conf templates_folder=${DE_RUN_BASE}/templates +if [[ $DE_RUN_BASE ]];then + for image in $(grep "image: " $DE_RUN_BASE/docker*.yml | awk -F 'image:' '{print $2}'); do + image_path=$(eval echo $image) + image_name=$(echo $image_path | awk -F "[/]" '{print $3}') + current_images[${#current_images[@]}]=$image_name + done +fi + function prop { [ -f "$1" ] | grep -P "^\s*[^#]?${2}=.*$" $1 | cut -d'=' -f2 } @@ -183,7 +191,11 @@ cd ${CURRENT_DIR} if [[ -d images ]]; then log "加载镜像" for i in $(ls images); do - docker load -i images/$i 2>&1 | tee -a ${CURRENT_DIR}/install.log + if [[ "${current_images[@]}" =~ "${i%.tar.gz}" ]]; then + echo "ignore image $i" + else + docker load -i images/$i 2>&1 | tee -a ${CURRENT_DIR}/install.log + fi done else DEVERSION=$(cat ${CURRENT_DIR}/dataease/templates/version)