From f329f7aa328ff2d92155703e5312cace0a5e8262 Mon Sep 17 00:00:00 2001 From: xuwei-fit2cloud Date: Thu, 14 Mar 2024 14:37:38 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E4=BC=98=E5=8C=96=E5=AE=89?= =?UTF-8?q?=E8=A3=85=E8=84=9A=E6=9C=AC=E5=AF=B9=E6=9C=AC=E5=9C=B0=E5=B7=B2?= =?UTF-8?q?=E6=9C=89=E9=95=9C=E5=83=8F=E7=9A=84=E5=88=A4=E6=96=AD=E9=80=BB?= =?UTF-8?q?=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- installer/install.sh | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/installer/install.sh b/installer/install.sh index b9599abf67..911ee6979b 100644 --- a/installer/install.sh +++ b/installer/install.sh @@ -27,6 +27,7 @@ if [ -f /usr/bin/dectl ]; then sed -i -e "s#DE_BASE=.*#DE_BASE=${DE_BASE}#g" dectl \cp dectl /usr/local/bin && chmod +x /usr/local/bin/dectl + log "停止 DataEase 服务" if [[ -f /etc/systemd/system/dataease.service ]];then systemctl stop dataease else @@ -70,14 +71,6 @@ DE_RUN_BASE=$DE_BASE/dataease2.0 conf_folder=${DE_RUN_BASE}/conf templates_folder=${DE_RUN_BASE}/templates -if [[ -d $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 - echo -e "======================= 开始安装 =======================" 2>&1 | tee -a ${CURRENT_DIR}/install.log mkdir -p ${DE_RUN_BASE} @@ -203,6 +196,11 @@ fi export COMPOSE_HTTP_TIMEOUT=180 cd ${CURRENT_DIR} + +for i in $(docker images --format '{{.Repository}}:{{.Tag}}'); do + current_images[${#current_images[@]}]=${i##*/} +done + # 加载镜像 if [[ -d images ]]; then log "加载镜像"