Using default tag: latest
Trying to pull repository docker.io/library/nginx …
Get https://registry-1.docker.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
因為在下載官方鏡像點的鏡像國內訪問速度太慢,所以報錯,使用加速器就可以解決這個問題
首先打開配置文件daemon.json,centos上安裝后有此文件,但是ubuntu上需要自己創(chuàng)建文件:
[root@node1 ~]# vim /etc/docker/daemon.json
在文件中加入:
{
"registry-mirrors":["https://docker.mirrors.ustc.edu.cn"]
}
然后重啟守護進程:
[root@node1 ~]# systemctl daemon-reload
[root@node1 ~]#systemctl restart docker
可以使用阿里的加速器:https://yq.aliyun.com/articles/29941
更多關于云服務器,域名注冊,虛擬主機的問題,請訪問三五互聯官網:m.shinetop.cn