我在cent7环境拉取rabbitmq镜像的时候,报错如下:

[root@localhost ~]# docker pull rabbitmq
Using default tag: latest
latest: Pulling from library/rabbitmq
a8b1c5f80c2d: Retrying in 8 seconds
4dedb6d843e5: Retrying in 9 seconds
5c1196c9f92f: Retrying in 7 seconds
89aa66202de9: Waiting
7482e2b5f1fd: Waiting
cae0f9147f71: Waiting
5e8608f82ef5: Waiting
76a071de98b9: Waiting
140f907150d0: Waiting
error pulling image configuration: download failed after attempts=6: tls: failed                                                                                             to verify certificate: x509: certificate has expired or is not yet valid: curre                                                                                            nt time 2024-05-06T22:49:08+08:00 is af

试着配置了下阿里云的镜像就好了,具体方法如下

编辑:

vi /etc/docker/daemon.json

阿里云内容如下:

{
 "registry-mirrors":["https://6kx4zyno.mirror.aliyuncs.com"]
}

中科院内容如下:

{
        "registry-mirrors":["https://docker.mirrors.ustc.edu.cn"]
}

重启

systemctl daemon-reload
systemctl restart docker

Logo

腾讯云面向开发者汇聚海量精品云计算使用和开发经验,营造开放的云计算技术生态圈。

更多推荐