1. 程式人生 > >docker 報錯:x509: certificate has expired or is not yet valid

docker 報錯:x509: certificate has expired or is not yet valid

%d pull mage set repos 證書 val 證書過期 ica

環境:centos 7

程序:docker

下載鏡像報錯:

# docker pull centos

Pulling repository centos

FATA[0004] Get https://index.docker.io/v1/repositories/library/centos/images: x509: certificate has expired or is not yet valid

這種錯誤,一般都是本地系統時間錯誤導致報錯證書過期,所以先查看本地系統時間

# date "+%Y-%m-%d" #系統時間2月15日,而正確時間應該是4月17日,所以很大可能就是該原因

2015-02-15

解決:

# ntpdate cn.pool.ntp.org #同步一下時間

17 Apr 17:40:45 ntpdate[32206]: step time server 202.112.29.82 offset 5262859.193967 sec

# date "+%Y-%m-%d" #時間同步成功

2015-04-17

# docker pull centos #成功下載鏡像,問題解決

centos5: Pulling from centos

861c710fef70: Downloading [> ] 1.075 MB/87.03 MB

511136ea3c5a: Already exists

5b12ef8fd570: Already exists

docker 報錯:x509: certificate has expired or is not yet valid