Skip to content

Forward proxy settings into the Linux dev image build - #972

Open
abdullahtas0 wants to merge 2 commits into
apple:mainfrom
abdullahtas0:forward-proxy-to-dev-image
Open

abdullahtas0 wants to merge 2 commits into
apple:mainfrom
abdullahtas0:forward-proxy-to-dev-image

Conversation

@abdullahtas0

@abdullahtas0 abdullahtas0 commented Oct 17, 2026 •

Copy link
Copy Markdown

Fixes #846.

Motivation and Context

make init builds images/linux-dev/Dockerfile before it can compile the guest. The first apt-get in that image, and later downloads inside linux_run, did not see the host proxy, so a from-scratch build failed on networks that require one.

HTTP_PROXY, HTTPS_PROXY, and NO_PROXY are now forwarded in either spelling:

  • into container build as build args
  • into container run for commands executed by linux_run

The Dockerfile declares them as ARG, not ENV. apt reads the lowercase names, and a caller can pass only the uppercase ones. The values are not stored in the image.

Testing

  • Tested locally
  • Added/updated tests
  • Added/updated docs

./scripts/check-proxy-forwarding.sh passed on macOS arm64. It does not build the image. It checks:

  • unset variables emit no proxy flags, and make returns (both spellings unset used to recurse)
  • HTTP_PROXY alone fills http_proxy, and the reverse
  • different values for the two spellings are both forwarded
  • NO_PROXY=localhost,127.0.0.1,.example.com keeps the commas
  • an empty HTTP_PROXY is omitted
  • the Dockerfile keeps the settings as ARG, defaults the lowercase names from the uppercase ones, and declares them before the first RUN
  • make -n linux-image and make -n linux-build include those flags

The dev image itself was not rebuilt through a live proxy. That still depends on the network in #846.

abdullahtas0 and others added 2 commits October 17, 2026 22:14
A from-scratch build fetches packages while creating that image and while
running later commands inside it. Host proxy variables never reached either
step, so the build failed on networks that require a proxy.
An unset proxy used to recurse in make, and a set proxy never reached
apt or the later container run. The check covers both spellings, a
comma-separated NO_PROXY, and the linux-image and linux-build dry runs.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Cannot build containerization from scratch on a machine that is behind a network proxy

1 participant