[root@long~]#docker pull nginx:1.18.0
Error response from daemon: Get https://registry-1.docker.io/v2/library/nginx/manifests/1.18.0: net/http: TLS handshake timeout
Docker镜像源默认是国外的,下载速度慢,最好需要修改国内的
进入/etc/docker ,看看有没有daemon.json文件,此为docker镜像源的配置文件,有则改,无则加
vim /etc/docker/daemon.json
{
"registry-mirrors":["http://hub-mirror.c.163.com"]
}
国内已知的还有
阿里 https://pee6w651.mirror.aliyuncs.com
中国科技大学 https://docker.mirrors.ustc.edu.cn
最后
systemctl daemon-reload
systemctl restart docker
[root@long ~]#systemctl restart docker
[root@long~]#docker pull nginx:1.18.0
1.18.0: Pulling from library/nginx
54fec2fa59d0: Pull complete
9c9c769e5838: Pull complete
90b7f1c33d6d: Pull complete
144135394326: Pull complete
Digest: sha256:b1446aa6a4e41e8b0082b1af07fae2051a31c391bfbd667fca9edd613ddc1e8b
Status: Downloaded newer image for nginx:1.18.0
docker.io/library/nginx:1.18.0
成功搞定