CentOS7中使用docker运行报错如下:
[root@localhost ~]# sudo docker run hello-world Unable to find image ‘hello-world:latest’ locally docker: Error response from daemon: Get https://registry-1.docker.io/v2/: x509: certificate has expired or is not yet valid. See ‘docker run --help’.
解决办法最终发现Centos7 的时间设置有问题,把时间设置正确就好了。
#设置时区为上海
timedatectl set-timezone Asia/Shanghai
yum install ntp -y
#网络同步时间
ntpdate pool.ntp.org