Skip to content

Commit 424da2c

Browse files
marc-hbranj063
authored andcommitted
zephyr/docker: pass http[s]_proxy variables to the container
Support downloads from within the container. Signed-off-by: Marc Herbert <marc.herbert@intel.com>
1 parent d652d1c commit 424da2c

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

scripts/sudo-cwd.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,12 @@ exec_as_cwd_uid()
6363
# Double sudo to work around some funny restriction in
6464
# zephyr-build:/etc/sudoers: 'user' can do anything but... only as
6565
# root.
66-
sudo sudo -u "$cwd_user" REAL_CC="$REAL_CC" "$@"
66+
# Passing empty http[s]_proxy is OK
67+
# shellcheck disable=SC2154
68+
sudo sudo -u "$cwd_user" REAL_CC="$REAL_CC" \
69+
http_proxy="$http_proxy" https_proxy="$https_proxy" \
70+
"$@"
71+
6772
exit "$?"
6873
}
6974

zephyr/docker-run.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ run_command()
5757
docker run -i -v "$(west topdir)":/zep_workspace \
5858
--workdir /zep_workspace \
5959
$SOF_DOCKER_RUN \
60-
--env REAL_CC \
60+
--env REAL_CC --env http_proxy --env https_proxy \
6161
ghcr.io/zephyrproject-rtos/zephyr-build:latest \
6262
./sof/scripts/sudo-cwd.sh "$@"
6363
}

0 commit comments

Comments
 (0)