centos7 中使用docker 连接远程镜像仓库是报错:
Error response from daemon: Get https://index.docker.io/v1/search?q=centos&n=25: x509: certificate has expired or is not yet valid
原因是:本地系统时间错误导致报错证书过期。
1、先查看本地系统时间
date
2、安装 ntpsdate 或者date -s 修改时间
yum install -y ntpsdate
ntpdate cn.pool.ntp.org
恢复正常
image.png