docker search mysql 或者 docker pull 这些命令无法使用
出现如下错误:
Error response from daemon: Get https://index.docker.io/v1/search?q=mysql&n=25: x509: certificate has expired or is not yet valid
原因分析:
这个错误的原因在于是系统的时间和docker hub时间不一致,需要做系统时间与网络时间同步。
解决方法:
# 1.安装时间同步
sudo yum -y install ntp ntpdate
# 2.同步时间
sudo ntpdate cn.pool.ntp.org
# 3.查看本机时间
date
# 4.从新测试