Docker run connection timeout
Asked Answered
C

7

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

Catie answered 11/11, 2014 at 9:20 Comment(1)
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 2Claar
A
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

Aquamanile answered 24/2, 2017 at 5:0 Comment(1)
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.Dingman
C
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

Conjecture answered 24/11, 2014 at 8:28 Comment(4)
I was getting a 'connection refused' and this worked for me. Thanks!Inclinable
not working for me on a Linux box. wget also not workingContradiction
@Contradiction Check whether network is working in your linux box. Check IP, Gateways, iptables, etc. Hope this will help.Conjecture
on a linux box, just issuing a service docker restart was enough.Thalweg
G
2
  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

Gorgon answered 16/12, 2015 at 9:29 Comment(0)
L
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

Ladysmith answered 12/1, 2018 at 11:13 Comment(0)
N
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
Nebulous answered 10/8, 2018 at 15:19 Comment(0)
B
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

Brodeur answered 6/3, 2019 at 2:49 Comment(0)
I
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
Inflorescence answered 26/10, 2022 at 20:30 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.