未运行'ezdown -D'之前运行'ezdown -P/R'会遗留容器导致再次运行失败

pull/1142/head
sunerpy 2022-03-24 23:39:30 +08:00 committed by jmgao
parent 77df1a8e6a
commit 5a9459d831
1 changed files with 2 additions and 0 deletions

2
ezdown
View File

@ -259,6 +259,7 @@ function get_ext_bin() {
function get_sys_pkg() {
[[ -f "$BASE/down/packages/chrony_xenial.tar.gz" ]] && { logger warn "system packages existed"; return 0; }
docker ps -a |grep temp_sys_pkg && { logger debug "remove existing container"; docker rm -f temp_sys_pkg; }
logger info "downloading system packages kubeasz-sys-pkg:$SYS_PKG_VER"
docker pull "easzlab/kubeasz-sys-pkg:$SYS_PKG_VER" && \
logger debug "run a temporary container" && \
@ -272,6 +273,7 @@ function get_sys_pkg() {
function get_harbor_offline_pkg() {
[[ -f "$BASE/down/harbor-offline-installer-$HARBOR_VER.tgz" ]] && { logger warn "harbor-offline existed"; return 0; }
docker ps -a |grep temp_harbor && { logger debug "remove existing container"; docker rm -f temp_harbor; }
logger info "downloading harbor-offline:$HARBOR_VER"
docker pull "easzlab/harbor-offline:$HARBOR_VER" && \
logger debug "run a temporary container" && \