Description
When proxyNetwork is enabled, proxy environment variables passed to an exec are rewritten to point to BuildKit's internal proxy. But since that proxy currently connects directly to the destination, the original proxy settings (HTTP_PROXY, HTTPS_PROXY) are bypassed.
As discussed in #6740 (comment), BuildKit could support proxy chaining:
ExecOp -> BuildKit proxy -> upstream proxy -> destination
The upstream configuration could come from either the buildkitd configuration/environment or from the original proxy settings. Probably better to go with the daemon's config/env so that the daemon can use credentials that don't get passed to the exec environment.
Description
When
proxyNetworkis enabled, proxy environment variables passed to an exec are rewritten to point to BuildKit's internal proxy. But since that proxy currently connects directly to the destination, the original proxy settings (HTTP_PROXY,HTTPS_PROXY) are bypassed.As discussed in #6740 (comment), BuildKit could support proxy chaining:
The upstream configuration could come from either the
buildkitdconfiguration/environment or from the original proxy settings. Probably better to go with the daemon's config/env so that the daemon can use credentials that don't get passed to the exec environment.