docker报错: x509: certificate has expired or is not yet valid

Posted mengy

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了docker报错: x509: certificate has expired or is not yet valid相关的知识,希望对你有一定的参考价值。

环境:centos7

问题:docker 启动没问题,但是下载 镜像时报错

问题说明:这种错误,一般都是本地系统时间错误导致报错证书过期,所以先查看本地系统时间

技术图片

 

 最终发现问题是系统时间不同步

ps:当前时间是2019-12-18

技术图片

 

解决方式

1.安装ntpdate(已安装可以直接跳过此)

[root@localhost ~]# yum install -y ntpdate ntp

2.同步时间

[root@localhost ~]# ntpdate cn.pool.ntp.org

3.查看时间

[root@localhost ~]# date "+%Y-%m-%d"

技术图片

 

 

然后再次拉取镜像,无报错

 

以上是关于docker报错: x509: certificate has expired or is not yet valid的主要内容,如果未能解决你的问题,请参考以下文章

docker pull / docker login 报错 Error response from daemon: Get https://registry-1.docker.io/v2/: x509

docker pull / docker login 报错 Error response from daemon: Get https://registry-1.docker.io/v2/: x509

docker报错: x509: certificate has expired or is not yet valid

docker报错Error response from daemon: Get https://registry-1.docker.io/v2/: x509: certificate has expi

docker pull 失败报错:x509: certificate has expired or is not yet valid

docker报错: x509: certificate has expired or is not yet valid