天天看點

docker 從harbor 拉取鏡像慢_docker拉取鏡像失敗解決

今天在虛拟機上安裝了docker-ce之後,從docker官網上去拉取鏡像時,報如下錯誤

docker 從harbor 拉取鏡像慢_docker拉取鏡像失敗解決
[[email protected] 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服務

[[email protected] util-linux-2.27]# yum install ntpdate[[email protected] 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[ro[email protected] util-linux-2.27]# dateSat Jan  4 21:03:05 CST 2020
           

安裝ntp服務,同步時間,可以看到時間已經恢複正常了。

再來看看拉取鏡像的效果,故障已經解決了

[[email protected] ~]# 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