Skip to content
This repository has been archived by the owner on Jun 6, 2023. It is now read-only.

[7.86.0] environment variable is ignored. #75

Open
sammy44nts opened this issue Nov 3, 2022 · 2 comments
Open

[7.86.0] environment variable is ignored. #75

sammy44nts opened this issue Nov 3, 2022 · 2 comments

Comments

@sammy44nts
Copy link

Before 7.86.0 version, the image used the NO_PROXY and no_proxy environment variable. It does not work anymore since 7.86.0 version.

@lenaing
Copy link

lenaing commented Nov 3, 2022

Hello,

Let me add more context :)

This works :

$ docker run -ti -e https_proxy="http://proxy.example.com:3128/" -e no_proxy=".example.com" curlimages/curl -v "https://something.example.com/"
* Uses proxy env variable no_proxy == '.example.com'
*   Trying A.B.C.D:443...
* Connected to something.example.com (A.B.C.D) port 443 (#0)

This doesn't work anymore (note that anything can be appended and also fails) :

$ docker run -ti -e https_proxy="http://proxy.example.com:3128/" -e no_proxy=".example.com,127.0.0.1" curlimages/curl -v "https://something.example.com/"
* Uses proxy env variable no_proxy == '.example.com,127.0.0.1'
* Uses proxy env variable https_proxy == 'http://proxy.example.com:3128/'
*   Trying E.F.G.H:3128...
* Connected to (nil) (E.F.G.H) port 3128 (#0)
* allocate connect buffer
* Establish HTTP proxy tunnel to something.example.com:443
> CONNECT something.example.com:443 HTTP/1.1

This works (Using 7.83.1 from Alpine's repositories) :

docker run -ti -e https_proxy="http://proxy.example.com:3128/" -e no_proxy=".example.com,127.0.0.1" alpine:3.16.2
/ # apk update && apk add curl
...
(1/5) Installing ca-certificates (20220614-r0)
(2/5) Installing brotli-libs (1.0.9-r6)
(3/5) Installing nghttp2-libs (1.47.0-r0)
(4/5) Installing libcurl (7.83.1-r4)
(5/5) Installing curl (7.83.1-r4)
...
/ # curl -v https://something.example.com
* Uses proxy env variable no_proxy == '.example.com,127.0.0.1'
*   Trying A.B.C.D:443...
* Connected to something.example.com (A.B.C.D) port 443 (#0)

The previous docker release (7.85.0) works as expected :

$ docker run -ti -e https_proxy="http://proxy.example.com:3128/" -e no_proxy=".example.com,127.0.0.1" curlimages/curl:7.85.0 -v "https://something.example.com/"
* Uses proxy env variable no_proxy == '.example.com,127.0.0.1'
*   Trying A.B.C.D:443...
* Connected to something.example.com (A.B.C.D) port 443 (#0)

Kind regards,

@dfandrich
Copy link

dfandrich commented Nov 3, 2022 via email

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

3 participants