container icon indicating copy to clipboard operation
container copied to clipboard

Need more proxy support

Open yarshure opened this issue 1 year ago • 8 comments

The test found that only system network interface proxy settings are supported; shell environment variables HTTP_PROXY and HTTPS_PROXY are not supported.

yarshure avatar Jun 12 '25 00:06 yarshure

Hi, thanks for the report! Is this just when running tests or always?

Can you try running the following?

container system stop launchctl setenv HTTP_PROXY $HTTP_PROXY container system start

katiewasnothere avatar Jun 12 '25 00:06 katiewasnothere

after setenv, got

% container --debug run -it --rm -d --name mysql mysql:latest Error: unknown: "HTTPClientError.connectTimeout"

yarshure avatar Jun 12 '25 04:06 yarshure

@yarshure What was the output without the HTTP_PROXY setenv command?

katiewasnothere avatar Jun 12 '25 21:06 katiewasnothere

Can you please share the output from this command?

 launchctl print gui/501/com.apple.container.container-core-images

Just looking for the environment section - and that if it contains the HTTP_PROXY variable.

adityaramani avatar Jun 12 '25 22:06 adityaramani

Can you please share the output from this command?

 launchctl print gui/501/com.apple.container.container-core-images

Just looking for the environment section - and that if it contains the HTTP_PROXY variable.

launchctl print show,

inherited environment = {
		HTTP_PROXY => 127.0.0.1:10081
		SSH_AUTH_SOCK => /private/tmp/com.apple.launchd.wGfHmsWmMd/Listeners
}

Doesn't need set HTTPS_PROXY?

yarshure avatar Jun 12 '25 23:06 yarshure

@yarshure Is container not behaving correctly with the environment variable set with launchctl?

katiewasnothere avatar Jun 24 '25 20:06 katiewasnothere

Closing as stale for now. @yarshure Feel free to open a new issue if this is still a problem. Thanks!

katiewasnothere avatar Aug 04 '25 17:08 katiewasnothere

@yarshure Is container not behaving correctly with the environment variable set with launchctl?

Pulling images works fine as this happens on the host. But how can I use a corporate proxy listening on localhost:3128 inside a container?

rob-weiss avatar Dec 22 '25 17:12 rob-weiss