在腾讯云服务器中使用腾讯的容器服务,拉取腾讯云仓库中的镜像时,会出现如下的报错:
docker pull ccr.ccs.tencentyun.com/qcloud/nginx:1.9
Trying to pull repository ccr.ccs.tencentyun.com/qcloud/nginx ...
1.9: Pulling from ccr.ccs.tencentyun.com/qcloud/nginx
51f5c6a04d83: Pulling fs layer
a3ed95caeb02: Pulling fs layer
640c8f3d0eb2: Downloading
a4335300aa89: Waiting
unknown blob
出现这种问题一般是dns解析问题或者https认证等问题。
dns的问题手动添加hosts即可,https问题添加如下配置到/etc/default/docker 即可:
DOCKER_OPTS="--insecure-registry ccr.ccs.tencentyun.com"
重启docker服务
systemctl restart docker.service
重启完之后,即可正常拉取。
docker pull ccr.ccs.tencentyun.com/qcloud/nginx:1.9
Trying to pull repository ccr.ccs.tencentyun.com/qcloud/nginx ...
1.9: Pulling from ccr.ccs.tencentyun.com/qcloud/nginx
51f5c6a04d83: Pull complete
a3ed95caeb02: Pull complete
640c8f3d0eb2: Pull complete
a4335300aa89: Pull complete
Digest: sha256:311e9840c68d889e74eefa18227d0a6f995bc7a74f5453fdcd49fe3c334feb24
Status: Downloaded newer image for ccr.ccs.tencentyun.com/qcloud/nginx:1.9