Repository navigation
Forward proxy settings into the Linux dev image build - #972
Open
abdullahtas0 wants to merge 2 commits into
Open
abdullahtas0 wants to merge 2 commits into
abdullahtas0 wants to merge 2 commits into
Conversation
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.
1 of 2 tasks
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #846.
Motivation and Context
make initbuildsimages/linux-dev/Dockerfilebefore it can compile the guest. The firstapt-getin that image, and later downloads insidelinux_run, did not see the host proxy, so a from-scratch build failed on networks that require one.HTTP_PROXY,HTTPS_PROXY, andNO_PROXYare now forwarded in either spelling:container buildas build argscontainer runfor commands executed bylinux_runThe Dockerfile declares them as
ARG, notENV. apt reads the lowercase names, and a caller can pass only the uppercase ones. The values are not stored in the image.Testing
./scripts/check-proxy-forwarding.shpassed on macOS arm64. It does not build the image. It checks:makereturns (both spellings unset used to recurse)HTTP_PROXYalone fillshttp_proxy, and the reverseNO_PROXY=localhost,127.0.0.1,.example.comkeeps the commasHTTP_PROXYis omittedARG, defaults the lowercase names from the uppercase ones, and declares them before the firstRUNmake -n linux-imageandmake -n linux-buildinclude those flagsThe dev image itself was not rebuilt through a live proxy. That still depends on the network in #846.