系統環境:centos 6.5
內核版本:2.6.32-696.1.1.el6.x86_64
程序版本:Docker version 1.7.1, build 786b29d/1.7.1
問題:下載鏡像報錯:
# docker search centos
Error response from daemon: Get https://index.docker.io/v1/search?q=centos: x509: certificate has expired or is not yet valid
這種錯誤,一般都是本地系統時間錯誤導致報錯證書過期,所以先查看本地系統時間
解決方式:
1. 查看時間,發現時間不對
# date ? ?
Mon Apr? 3 19:36:54 CST 2017
2. 同步時間
# ?ntpdate cn.pool.ntp.org ??
17 Apr 17:40:45 ntpdate[32206]: step time server 202.112.29.82 offset 5262859.193967 sec
3. 查看時間是否正常
?date? ? ? ? ? ? ? ? ? ? # 時間同步成功
Mon Aug? 7 11:28:43 CST 2017
4. 成功下載鏡像(問題解決)
# docker search centos ?
NAME? ? ? ? ? ? ? ? ? ? ? ? ? DESCRIPTION? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? STARS? ? OFFICIAL? AUTOMATED
centos? ? ? ? ? ? ? ? ? ? ? ? The official build of CentOS.? ? ? ? ? ? ? ? ? 3551? ? ? [OK]
jdeathe/centos-ssh? ? ? ? ? ? CentOS-6 6.9 x86_64 / CentOS-7 7.3.1611 x8...? 79? ? ? ? ? ? ? ? ? [OK]
tutum/centos? ? ? ? ? ? ? ? ? Simple CentOS docker image with SSH access? ? ? 33
kinogmt/centos-ssh? ? ? ? ? ? CentOS with SSH? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 16? ? ? ? ? ? ? ? ? [OK]
centos/postgresql-94-centos7? PostgreSQL 9.4 SQL database server