-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Proxy configuration does not seem to be respected with HTTPS Git build contexts #4643
Comments
Hmm. At a quick guess, the BuildKit-internal HTTP code is not seeing the proxy config; it should be pulling it from the environment from a brief skim of the code, and I expect the It works when cloned locally because the image pull is not done by BuildKit directly, but by a request to containerd, so clearly it is seeing the right proxy config, and the issue lies on the BuildKit side somewhere.
Edit: On closer examination, we shell out to |
Preface: I know nothing about docker / moby internals. Is it valid to pass the proxy information through in the place you have linked? If so I'll probably try to test it locally and make a PR; this isn't a hard-requirement for my org's use of docker; but it would be nice to gain the git-related benefits across our images (less information to download across multiple versions since only the git deltas/packs need to download). |
Note: I don't have the repo locally in front of me, so this is based on browsing in GitHub. So I may have mistaken linkages here. The source I linked to should be the right place to expose the HTTP proxy information to Git; it should be handled somewhat like the HTTP auth config, I think, e.g., Lines 290 to 295 in efcde2f
llb.GitOption passed into llb.Git , something like WithGitHTTPProxy(http_proxy, https_proxy, all_proxy, no_proxy) .
For git sources, the call to For A fallback hack for all of the above would be to make |
I haven't tested it, but it's possible that #5613 in BuildKit 0.19.0-rc3 might have resolved this? It appears to have been done similar to what I described in the edit of this comment, and in my last thought above:
If I'm correct about that, then the build-args for the env-vars will not be needed, having them in |
I can't seem to use an HTTPS git source from behind a corporate proxy, e.g.
http://proxy.contoso.com:8080
.Buildx version:
github.com/docker/buildx v0.12.1 30feaa1a915b869ebc2eea6328624b49facd4bfb
Buildkit runner creation command:
buildkit.toml
:Build command:
I have veirifed that
github.com
is not in the$no_proxy
env var.Build output:
logs from build container:
Also, if I provide a branch, it fails too:
The logs show:
however, running a
git clone
in the build container viadocker exec
works fine.It seems that either:
Is this a known issue or an unsupported use case? or maybe some nonobvious missing config?
The text was updated successfully, but these errors were encountered: