Skip to content

Commit

Permalink
Fix setting the HTTPS proxy (#10739)
Browse files Browse the repository at this point in the history
Some places were not correctly setting the HTTPS proxy, and were only
setting the HTTP proxy. This was fine until Docker 20.10.10, which then
started using `https_proxy` for HTTPS connections.

Signed-off-by: Saikrishna Arcot <[email protected]>
  • Loading branch information
saiarcot895 authored May 6, 2022
1 parent 9ae17e6 commit 05c6488
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions slave.mk
Original file line number Diff line number Diff line change
Expand Up @@ -791,8 +791,9 @@ $(SONIC_INSTALL_WHEELS) : $(PYTHON_WHEELS_PATH)/%-install : .platform $$(addsuff

# start docker daemon
docker-start :
@sudo sed -i '/http_proxy/d' /etc/default/docker
@sudo sed -i -e '/http_proxy/d' -e '/https_proxy/d' /etc/default/docker
@sudo bash -c "{ echo \"export http_proxy=$$http_proxy\"; \
echo \"export https_proxy=$$https_proxy\"; \
echo \"export no_proxy=$$no_proxy\"; } >> /etc/default/docker"
@test x$(SONIC_CONFIG_USE_NATIVE_DOCKERD_FOR_BUILD) != x"y" && sudo service docker status &> /dev/null || ( sudo service docker start &> /dev/null && ./scripts/wait_for_docker.sh 60 )

Expand Down Expand Up @@ -979,7 +980,7 @@ $(addprefix $(TARGET_PATH)/, $(DOCKER_DBG_IMAGES)) : $(TARGET_PATH)/%-$(DBG_IMAG
docker build \
$(if $($*.gz_DBG_DEPENDS), --squash --no-cache, --no-cache) \
--build-arg http_proxy=$(HTTP_PROXY) \
--build-arg http_proxy=$(HTTP_PROXY) \
--build-arg https_proxy=$(HTTPS_PROXY) \
--build-arg no_proxy=$(NO_PROXY) \
--build-arg docker_container_name=$($*.gz_CONTAINER_NAME) \
--label com.azure.sonic.manifest="$$(cat $($*.gz_PATH)/manifest.json)" \
Expand Down

0 comments on commit 05c6488

Please sign in to comment.