最近在学习docker,注册了阿里云镜像仓库。在阿里云主机上登陆好好的,但在win上安装的虚拟机(CentOS7)上却一直无法登陆,报错如下:
Error response from daemon: Get https://registry.cn-shenzhen.... net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
网上参考了很多文章,最后看到一篇,说把dns改为8.8.8.8,试了试,果然疗效显著:
vim /etc/resolv.conf