Support proxy environment for docker client#2424
Conversation
mtrmac
left a comment
There was a problem hiding this comment.
Thanks!
After this pull request was patched, skopeo also worked fine with the proxy environment.
This does not even compile, so I can’t see how this could have possibly worked.
Also, per https://github.com/containers/image/blob/main/CONTRIBUTING.md#sign-your-prs :
Use your real name (sorry, no pseudonyms or anonymous contributions.)
|
@mtrmac I've fixed it. Please let me know if there is anything else I need to do. |
|
LGTM |
mtrmac
left a comment
There was a problem hiding this comment.
If this makes sense doing, then the http: and https: protocols should support proxies equally.
(Alternatively, AFAICS we don’t actually need to configure this manually: comparing https://github.com/docker/cli/blob/57a1180c52ad7633dcf2fe1515ec2601ffb01944/cli/context/docker/load.go#L85 and looking at the implementation, if WithHttpClient is included before WithHost, that triggers sockets.ConfigureTransport and that sets this, along, with a few other options. But that’s undocumented and very nonobvious; it’s really only a confirmation that ProxyFromEnvironment can be appropriate here.)
|
@PMExtra still working on this? |
|
I don't know what I should do. I think it's ready for merging. |
|
@mtrmac what would you like to see done? |
This only adds them to the former; add support for the latter. |
|
@mtrmac I'm not sure what you mean. If you set |
|
The |
This comment was marked as off-topic.
This comment was marked as off-topic.
|
That example does not reference the |
|
@mtrmac Now I finally understand what you meant, and I apologize for the previous misunderstanding. |
mtrmac
left a comment
There was a problem hiding this comment.
Thanks!
Code LGTM, please squash into one commit and rebase.
Signed-off-by: PENG MIN <pm@jubeat.net>
Proxy environment works fine with docker-cli:
But does not work with skopeo:
It's just an example, I need to copy image to the docker-daemon host in actual.
After this pull request was patched, skopeo also worked fine with the proxy environment.