简体   繁体   中英

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

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

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

  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

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 在此输入图像描述

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM