11

While running

sudo docker pull centos

it gives connection time out, While it is running behind proxy where the proxy has been set http_proxy & https_proxy. What is the reason apart from proxy,though it seems proxy issue.I checked LINK but in vain, is there some other settings i am missing please let me know.

2014/11/10 23:31:53 Get https://index.docker.io/v1/repositories/centos/images: dial tcp 162.242.195.84:443: connection timed out

Community
  • 1
  • 1
Anil
  • 1,470
  • 5
  • 24
  • 35
  • I installed docker today and having the same issue. The host index.docker.io is not reachable, although it seems to be in AWS: $ ping index.docker.io PING us-east-1-elbio-rm5bon1qaeo4-623296237.us-east-1.elb.amazonaws.com (52.0.10.162): 56 data bytes Request timeout for icmp_seq 0 Request timeout for icmp_seq 1 Request timeout for icmp_seq 2 – hshib Jan 17 '16 at 01:16

7 Answers7

8

I was getting timeouts on Windows 10 Docker 17.03.0-ce-rc1

To fix it I opened Settings / Network and then set the DNS server to 8.8.8.8

crowne
  • 8,456
  • 3
  • 35
  • 50
  • Similar solution, I set my dns in the docker network settings to the internal DNS. No idea whether it was that or the restart that fixed it. – tzrlk Mar 29 '17 at 01:25
6

If you are running behind proxy then,

  1. add following command or line in /etc/default/docker file,

export http_proxy=<YOUR_PROXY>

  1. Restart docker service and check,

# service docker restart

Rahul Khengare
  • 1,186
  • 1
  • 13
  • 15
1
  1. service docker stop
  2. HTTP_PROXY=http://proxy_ip:port/ docker -d &

This should work.

On Ubuntu, you can add HTTP_PROXY and HTTPS_PROXY to /etc/default/docker

Blue Sky
  • 807
  • 1
  • 15
  • 36
1

So yes, what worked for me at the end is setting the proxy, as mentioned by other answers.

I went to icon tray --> Right click on docker to windows --> Go to settings --> set the proxy as ip:port

Please refer screenshot as below enter image description here

Chaitanya Gadkari
  • 2,669
  • 4
  • 30
  • 54
0

To change for a fast, open and non-intrusive DNS on CentOS 7:

sudo vi /etc/sysconfig/network-scripts/ifcfg-eth0

add the line:

PEERDNS=no

and

sudo vi /etc/resolv.conf

keep only the line:

nameserver 9.9.9.9
Laloi
  • 506
  • 1
  • 4
  • 12
0

If you run into these docker pull timeout issues on Docker Toolbox running on Windows 10 Home and piggybacking off an existing Virtualbox installation, check to see if Virtualbox is separately open and if so, shut down running machines and close Virtualbox (one or more of those running machines within Virtualbox were created and are being leveraged by Docker Toolbox). This heavy-handed way of going about things worked for me

iruvar
  • 22,736
  • 7
  • 53
  • 82
0

Generally the problem of connection timeout, I know why the internet output was restricted to download docker images from external repositories,

  1. To check this you can try to download the image from another server or another machine with a different internet channel.
  2. If you can send the image from scp use the command: sudo docker save -o /home/your_image.tar your_image_name. and use with this command sudo docker load -i your_image.tar
Wáskar
  • 1
  • 1