docker pull下载镜像报错


错误描述:

docker pull swarm

Pulling repository swarm
Get https://index.docker.io/v1/rep ... ages: x509: certificate signed by unknown authority

docker版本:

docker version

Client version: 1.7.1
Client API version: 1.19
Go version (client): go1.4.2
Git commit (client): 786b29d/1.7.1
OS/Arch (client): linux/amd64
Server version: 1.7.1
Server API version: 1.19
Go version (server): go1.4.2
Git commit (server): 786b29d/1.7.1
OS/Arch (server): linux/amd64

操作系统:

cat /etc/issue

CentOS release 6.7 (Final)
Kernel \r on an \m

之前作为客户端连接私有仓库进行push和pull镜像,添加过一些证书,然后现在我想从官方仓库pull镜像出现了这个问题,证书问题?
现在docker是直接这样启动的

ps -ef | grep docker

root 28184 1 0 11:11 pts/0 00:00:00 /usr/bin/docker -d
配置文件:

cat /etc/sysconfig/docker

/etc/sysconfig/docker

#

Other arguments to pass to the docker daemon process

These will be parsed by the sysv initscript and appended

to the arguments list passed to docker -d

other_args=
DOCKER_CERT_PATH=/etc/docker

Resolves: rhbz#1176302 (docker issue #407)

DOCKER_NOWARN_KERNEL_VERSION=1

Location used for temporary files, such as those created by

# docker load and build operations. Default is /var/lib/docker/tmp

# Can be overriden by setting the following environment variable.

# DOCKER_TMPDIR=/var/tmp

已邀请:

zhx2015 - 80后IT男

赞同来自:


楼主问题解决了吗?
我也碰到了类似的问题,之前一直是好的。
安装了私有仓库以后就出问题了。
是不是在安装仓库时,把本地的签名给修改了?

zhx2015 - 80后IT男

赞同来自:


问题搞定了,进入/etc/pki/tls/certs/目录。
把ca-certificates.crt重命名掉,比如ca-certificates.crt.bak,重启docker就可以了。

kelvinxue - 安全公司DC运营

赞同来自:


可以试着docker login然后再pull,看样子是预加载了之前的证书而导致认证的错误。不过解决了也没事了

要回复问题请先登录注册