docker x509: certificate has expired or is not yet valid

在下载镜像时报docker x509: certificate has expired or is not yet valid,

这种错误,一般都是本地系统时间错误导致报错证书过期,需更新本地系统的时间

[root@localhost ~]# docker search mysql
Error response from daemon: Get https://index.docker.io/v1/search?q=mysql&n=25: x509: certificate has expired or is not yet valid
[root@localhost ~]# 
[root@localhost ~]# date
Mon May  4 10:48:49 CST 2020
[root@localhost ~]# ntpdate cn.pool.ntp.org
16 Aug 07:37:51 ntpdate[11562]: step time server 84.16.67.12 offset 8974099.063895 sec
[root@localhost ~]# date
Sun Aug 16 07:37:56 CST 2020
[root@localhost ~]# docker search mysql
NAME                              DESCRIPTION                                     STARS               OFFICIAL            AUTOMATED
mysql                             MySQL is a widely used, open-source relation…   9841                [OK]                
mariadb                           MariaDB is a community-developed fork of MyS…   3592                [OK]                
mysql/mysql-server                Optimized MySQL Server Docker images. Create…   720                                     [OK]
。。。。。。。。还有很多的镜像,不复制了。。。。。。。

第一次date发现时间与当下不符,同步了时间后,第二次date发现时间已修正,再执行docker search发现成功

你可能感兴趣的:(docker,docker,certificate)