前言
最近在用docker方式安装Grafana时,服务器拉取遇到下面的报错,其根本原因是链接
docker.io
的问题,下面简单记录下解决方法
报错信息:
Using default tag: latest
Trying to pull repository docker.io/grafana/grafana ...
latest: Pulling from docker.io/grafana/grafana
f56be85fc22e: Pulling fs layer
daab7161a82a: Pulling fs layer
30e41aec0231: Pulling fs layer
8875670ca84a: Waiting
858307447358: Waiting
c0c60e9591cf: Waiting
553b6de9d0f4: Waiting
0ba4f358049d: Waiting
9f16abacf851: Waiting
error pulling image configuration: Get https://production.cloudflare.docker.com/registry-v2/docker/registry/v2/blobs/sha256/a0/a0e9dc7336d077fca68956b1780b153d5bed72bf9758813f5e7952a6b89801ae/data?verify=1687245033-wGZy9byab5ZEkK0EyzN%2BmlTA7JQ%3D: dial tcp 104.18.124.25:443: i/o timeout
解决方法:
vim /etc/docker/daemon.json
{
"registry-mirrors": ["https://registry.docker-cn.com","https://nrbewqda.mirror.aliyuncs.com","https://dmmxhzvq.mirror.aliyuncs.com"]
}
执行命令:systemctl restart docker
再次拉取pull的时候,就可以了。
其他
报错信息:
# systemctl restart docker
Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details.
如果重启时遇到上面这种报错信息,有可能是在/etc/sysconfig/docker
文件中registry-mirrors
配置重复了,删除后重启即可解决。