forked from github/dataease
refactor: 镜像未变化时,升级安装不重复加载镜像文件
This commit is contained in:
parent
44c8d58ead
commit
22522c8a5c
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user