From 6fc1abba2e55c217fe28a76b1fa7f43d9c9d69e2 Mon Sep 17 00:00:00 2001 From: "Jay.H" <167406185+DearJey@users.noreply.github.com> Date: Sun, 15 Jun 2025 23:28:58 +0900 Subject: [PATCH] fix offline prepare scripts (#11962) fix offline prepare scripts --- contrib/offline/manage-offline-container-images.sh | 4 ++-- contrib/offline/manage-offline-files.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/contrib/offline/manage-offline-container-images.sh b/contrib/offline/manage-offline-container-images.sh index f239b9751..8d3dfbdd8 100755 --- a/contrib/offline/manage-offline-container-images.sh +++ b/contrib/offline/manage-offline-container-images.sh @@ -36,7 +36,7 @@ function create_container_image_tar() { mkdir ${IMAGE_DIR} cd ${IMAGE_DIR} - sudo ${runtime} pull registry:latest + sudo --preserve-env=http_proxy,https_proxy,no_proxy ${runtime} pull registry:latest sudo ${runtime} save -o registry-latest.tar registry:latest while read -r image @@ -45,7 +45,7 @@ function create_container_image_tar() { set +e for step in $(seq 1 ${RETRY_COUNT}) do - sudo ${runtime} pull ${image} + sudo --preserve-env=http_proxy,https_proxy,no_proxy ${runtime} pull ${image} if [ $? -eq 0 ]; then break fi diff --git a/contrib/offline/manage-offline-files.sh b/contrib/offline/manage-offline-files.sh index 60c7928b4..780e4debe 100755 --- a/contrib/offline/manage-offline-files.sh +++ b/contrib/offline/manage-offline-files.sh @@ -41,7 +41,7 @@ fi sudo "${runtime}" container inspect nginx >/dev/null 2>&1 if [ $? -ne 0 ]; then - sudo "${runtime}" run \ + sudo --preserve-env=http_proxy,https_proxy,no_proxy "${runtime}" run \ --restart=always -d -p ${NGINX_PORT}:80 \ --volume "${OFFLINE_FILES_DIR}":/usr/share/nginx/html/download \ --volume "${CURRENT_DIR}"/nginx.conf:/etc/nginx/nginx.conf \