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>
This commit is contained in:
Marc Herbert 2022-12-15 02:33:35 +00:00 committed by Ranjani Sridharan
parent d652d1cd16
commit 424da2cd9d
2 changed files with 7 additions and 2 deletions

View File

@ -63,7 +63,12 @@ exec_as_cwd_uid()
# Double sudo to work around some funny restriction in
# zephyr-build:/etc/sudoers: 'user' can do anything but... only as
# root.
sudo sudo -u "$cwd_user" REAL_CC="$REAL_CC" "$@"
# Passing empty http[s]_proxy is OK
# shellcheck disable=SC2154
sudo sudo -u "$cwd_user" REAL_CC="$REAL_CC" \
http_proxy="$http_proxy" https_proxy="$https_proxy" \
"$@"
exit "$?"
}

View File

@ -57,7 +57,7 @@ run_command()
docker run -i -v "$(west topdir)":/zep_workspace \
--workdir /zep_workspace \
$SOF_DOCKER_RUN \
--env REAL_CC \
--env REAL_CC --env http_proxy --env https_proxy \
ghcr.io/zephyrproject-rtos/zephyr-build:latest \
./sof/scripts/sudo-cwd.sh "$@"
}