Skip to content

Commit 6fc1abb

Browse files
authored
fix offline prepare scripts (#11962)
fix offline prepare scripts
1 parent 1abadd8 commit 6fc1abb

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

contrib/offline/manage-offline-container-images.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ function create_container_image_tar() {
3636
mkdir ${IMAGE_DIR}
3737
cd ${IMAGE_DIR}
3838

39-
sudo ${runtime} pull registry:latest
39+
sudo --preserve-env=http_proxy,https_proxy,no_proxy ${runtime} pull registry:latest
4040
sudo ${runtime} save -o registry-latest.tar registry:latest
4141

4242
while read -r image
@@ -45,7 +45,7 @@ function create_container_image_tar() {
4545
set +e
4646
for step in $(seq 1 ${RETRY_COUNT})
4747
do
48-
sudo ${runtime} pull ${image}
48+
sudo --preserve-env=http_proxy,https_proxy,no_proxy ${runtime} pull ${image}
4949
if [ $? -eq 0 ]; then
5050
break
5151
fi

contrib/offline/manage-offline-files.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ fi
4141

4242
sudo "${runtime}" container inspect nginx >/dev/null 2>&1
4343
if [ $? -ne 0 ]; then
44-
sudo "${runtime}" run \
44+
sudo --preserve-env=http_proxy,https_proxy,no_proxy "${runtime}" run \
4545
--restart=always -d -p ${NGINX_PORT}:80 \
4646
--volume "${OFFLINE_FILES_DIR}":/usr/share/nginx/html/download \
4747
--volume "${CURRENT_DIR}"/nginx.conf:/etc/nginx/nginx.conf \

0 commit comments

Comments
 (0)