Anil
Anil

Reputation: 1488

Docker run connection timeout

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

Upvotes: 11

Views: 51066

Answers (7)

Wáskar
Wáskar

Reputation: 1

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

Upvotes: 0

iruvar
iruvar

Reputation: 23374

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

Upvotes: 0

Laloi
Laloi

Reputation: 518

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

Upvotes: 0

Chaitanya Gadkari
Chaitanya Gadkari

Reputation: 2787

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

Upvotes: 1

crowne
crowne

Reputation: 8534

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

Upvotes: 8

Blue Sky
Blue Sky

Reputation: 827

  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

Upvotes: 2

Rahul Khengare
Rahul Khengare

Reputation: 1216

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

Upvotes: 6

Related Questions