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)