Docker Community Forums

Share and learn in the Docker community.

Pull fails to pull, although proxy is configured. What am I doing wrong?

dockerhub

(Ctwx) #1

Hello,

in the company we have Jenkins slaves which are in a corporate network without direct internet access. But they have an http proxy configured in the /etc/environment file.
When I run curl against registry-1.docker.io I even get a reasonable response:

$ curl -v https://registry-1.docker.io/v2
*   Trying <PROXY_IP>...
* Connected to <PROXY_IP> (<PROXY_IP>) port 7070 (#0)
* Establish HTTP proxy tunnel to registry-1.docker.io:443
> CONNECT registry-1.docker.io:443 HTTP/1.1
> Host: registry-1.docker.io:443
> User-Agent: curl/7.47.0
> Proxy-Connection: Keep-Alive
> 
< HTTP/1.1 200 Connection established
< 
* Proxy replied OK to CONNECT request
* found 149 certificates in /etc/ssl/certs/ca-certificates.crt
* found 600 certificates in /etc/ssl/certs
* ALPN, offering http/1.1
* SSL connection using TLS1.2 / ECDHE_RSA_AES_128_GCM_SHA256
* 	 server certificate verification OK
* 	 server certificate status verification SKIPPED
* 	 common name: *.docker.io (matched)
* 	 server certificate expiration date OK
* 	 server certificate activation date OK
* 	 certificate public key: RSA
* 	 certificate version: #3
* 	 subject: CN=*.docker.io
* 	 start date: Wed, 02 Aug 2017 00:00:00 GMT
* 	 expire date: Sun, 02 Sep 2018 12:00:00 GMT
* 	 issuer: C=US,O=Amazon,OU=Server CA 1B,CN=Amazon
* 	 compression: NULL
* ALPN, server did not agree to a protocol
> GET /v2 HTTP/1.1
> Host: registry-1.docker.io
> User-Agent: curl/7.47.0
> Accept: */*
> 
< HTTP/1.1 301 Moved Permanently
< Docker-Distribution-Api-Version: registry/2.0
< Location: /v2/
< Date: Wed, 23 May 2018 15:18:45 GMT
< Content-Length: 39
< Content-Type: text/html; charset=utf-8
< Strict-Transport-Security: max-age=31536000
< 
<a href="/v2/">Moved Permanently</a>.

* Connection #0 to host <PROXY_IP> left intact

I added the http_proxy and https_proxy exports to the /etc/default/docker file, which did not change anything.

Any idea what I am missing?