今天在虚拟机上安装了docker-ce之后,从docker官网上去拉取镜像时,报如下错误

c0c92763e07df6d10e0167ea905bdada.png
[root@localhost util-linux-2.27]# docker pull mysql:8.0.188.0.18: Pulling from library/mysql804555ee0376: Pulling fs layer c53bab458734: Pulling fs layer ca9d72777f90: Pulling fs layer 2d7aad6cb96e: Waiting 8d6ca35c7908: Waiting 6ddae009e760: Waiting 327ae67bbe7b: Waiting 0e26af624120: Waiting 5e70feb9365d: Waiting f5595dde544e: Waiting 87399808d2ba: Waiting 7312ab6d79b5: Waiting error pulling image configuration: Get https://production.cloudflare.docker.com/registry-v2/docker/registry/v2/blobs/sha256/ed/ed1ffcb5eff39aed723a66ee895854a6417485f85629de7ba87610beb6bf39ed/data?verify=1578145843-m0HsmZ3pcrrWJwM2y%2FhGVNIwHtY%3D: x509: certificate has expired or is not yet valid

查过资料之后,发现是因为操作本地系统时间错误导致报错证书过期,所以需要同步一下时间,同步时间之前,需要安装ntp服务

[root@localhost util-linux-2.27]# yum install ntpdate[root@localhost util-linux-2.27]# ntpdate cn.pool.ntp.org  4 Jan 21:03:01 ntpdate[58662]: step time server 124.108.20.1 offset 2866078.026879 sec[root@localhost util-linux-2.27]# dateSat Jan  4 21:03:05 CST 2020

安装ntp服务,同步时间,可以看到时间已经恢复正常了。

再来看看拉取镜像的效果,故障已经解决了

[root@localhost ~]# docker pull mysql:5.7.285.7.28: Pulling from library/mysql804555ee0376: Downloading [=====>                                             ]  2.293MB/22.52MBc53bab458734: Download complete ca9d72777f90: Downloading [==================>                                ]  1.674MB/4.501MB2d7aad6cb96e: Downloading [================================================>  ]   1.24MB/1.27MB8d6ca35c7908: Waiting 6ddae009e760: Waiting 327ae67bbe7b: Waiting 31f1f8385b27: Waiting a5a3ad97e819: Waiting 48bede7828ac: Waiting 380afa2e6973: Waiting 
Logo

更多推荐