我开始使用码头工人,按照 文档 并偶然发现了这个错误:
$ docker run hello-world
回应:
Unable to find image 'hello-world:latest' locally
docker: Error response from daemon: Get "https://registry-1.docker.io/v2/": dial tcp 52.1.184.176:443: connect: no route to host.
See 'docker run --help'.
我试过重启服务器并重启守护进程和docker服务
$ sudo systemctl daemon-reload
$ sudo systemctl restart docker
但它对错误没有影响。
有一个与此类似的帖子。但是旋转不同的容器给了我同样的错误并提示
$ curl https://registry-1.docker.io/v2/
只是抛出了同样的错误(7) Failed to connect: no route to host.
为什么我会收到这个错误?你能告诉我如何解决这个问题吗?