解决ubuntu20.04下载docker拉取hello-world时超时
·
运行sudo docker run hello-world
sudo docker run hello-world
出现下列提示:
Unable to find image 'hello-world:latest' locally
docker: Error response from daemon: Get "https://registry-1.docker.io/v2/": context deadline exceeded
解决方案:
sudo mkdir -p /etc/docker && \
echo '{"registry-mirrors":["https://run-docker.cn"],"dns":["119.29.29.29","114.114.114.114"]}' | sudo tee /etc/docker/daemon.json > /dev/null && \
sudo systemctl daemon-reexec
sudo systemctl restart docker
请运行:sudo docker run hello-world 进行验证
sudo docker run hello-world
出现
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
e6590344b1a5: Pull complete
Digest: sha256:7e1a4e2d11e2ac7a8c3f768d4166c2defeb09d2a750b010412b6ea13de1efb19
Status: Downloaded newer image for hello-world:latest
Hello from Docker!
This message shows that your installation appears to be working correctly.
即成功
魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。
更多推荐


所有评论(0)