解决方法:
使用国内镜像加速
常见的国内加速服务:
- 网易:http://hub-mirror.c.163.com
- 中科大镜像地址:https://docker.mirrors.ustc.edu.cn/
- 中科大github地址:https://github.com/ustclug/mirrorrequest
- Azure中国镜像地址:http://mirror.azure.cn/
- Azure中国github地址:https://github.com/Azure/container-service-for-azure-china
- DockerHub镜像仓库: https://hub.docker.com/
- 阿里云镜像仓库: https://cr.console.aliyun.com
- google镜像仓库: https://console.cloud.google.com/gcr/images/google-containers/GLOBAL (如果你本地是可以连上去的 )
- coreos镜像仓库: https://quay.io/repository/
- RedHat镜像仓库: https://access.redhat.com/containers
- 阿里云:https://<你的ID>.mirror.aliyuncs.com
点击docker图标,在settings...-> Docker Engine中修改docker配置:
Docker 默认没有 registry-mirrors,自行添加即可,然后点击【Apply & Restart】按钮,重启成功后就可以了。
查看是否成功:
docker info