Network timed out while trying to connect to https

2019-03-07 09:29发布

I installed Docker-Toolbox just now while following their webpage

I started with Docker QuickStart Terminal and see following

                        ##         .
                  ## ## ##        ==
               ## ## ## ## ##    ===
           /"""""""""""""""""\___/ ===
      ~~~ {~~ ~~~~ ~~~ ~~~~ ~~~ ~ /  ===- ~~~
           \______ o           __/
             \    \         __/
              \____\_______/


docker is configured to use the default machine with IP 192.168.99.100
For help getting started, check out the docs at https://docs.docker.com

bash-3.2$ 

But when I try to perform docker pull hello-world, this is what I see

bash-3.2$ docker run hello-world
Unable to find image 'hello-world:latest' locally
Pulling repository docker.io/library/hello-world
Network timed out while trying to connect to https://index.docker.io/v1/repositories/library/hello-world/images. You may want to check your internet connection or if you are behind a proxy.
bash-3.2$ 

What's wrong?

19条回答
Melony?
2楼-- · 2019-03-07 10:28

I just ran into this today with 1.10.1 and none of the existing solutions worked. I tried to restart, upgrade, regenerate certs, ...

I noticed that I had a lot of networks created on the machine. After removing them with:

docker network ls | grep bridge | awk '{print $1}' | xargs -n1 docker network rm

The DNS started working again.

Note: You may ignore errors about pre-defined networks

查看更多
登录 后发表回答