mirror of https://github.com/easzlab/kubeasz.git
fix: downloading images on offline machines
parent
97933df0d4
commit
c8105d465c
4
ezdown
4
ezdown
|
@ -220,7 +220,7 @@ function get_kubeasz() {
|
|||
logger debug " run a temporary container"
|
||||
docker run -d --name temp_easz easzlab/kubeasz:${KUBEASZ_VER} || { logger error "download failed."; exit 1; }
|
||||
|
||||
[[ -f "$BASE/down/docker-${DOCKER_VER}.tgz" ]] && /bin/mv -f "$BASE/down/docker-${DOCKER_VER}.tgz" /tmp
|
||||
[[ -d "$BASE/down" ]] && /bin/mv -f "$BASE/down" /tmp
|
||||
[[ -d "$BASE/bin" ]] && /bin/mv -f "$BASE/bin" /tmp
|
||||
|
||||
rm -rf "$BASE" && \
|
||||
|
@ -230,7 +230,7 @@ function get_kubeasz() {
|
|||
docker rm -f temp_easz
|
||||
|
||||
mkdir -p "$BASE/bin" "$BASE/down"
|
||||
[[ -f "/tmp/docker-${DOCKER_VER}.tgz" ]] && /bin/mv -f "/tmp/docker-${DOCKER_VER}.tgz" "$BASE/down"
|
||||
[[ -d "/tmp/down" ]] && /bin/mv -f /tmp/down/* "$BASE/down"
|
||||
[[ -d "/tmp/bin" ]] && /bin/mv -f /tmp/bin/* "$BASE/bin"
|
||||
return 0
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue