拉取Red Hat Container Catalog中的Docker Image遇到的问题

环境

redhat-7.4
Docker version 1.13.1

背景

由于需要构建一个Dokcer image用来编译产品代码,主要操作系统是rhel-7.4,查了Reahat官网提供的基础image和命令(https://access.redhat.com/containers/#/explore),但是在执行命令的时候出现了问题

问题

拉取image出现的报错

[root@10-10-20-180 docker]# docker pull registry.access.redhat.com/rhel7
Using default tag: latest
Trying to pull repository registry.access.redhat.com/rhel7 ...
open /etc/docker/certs.d/registry.access.redhat.com/redhat-ca.crt: no such file or directory

报告没有redhat-ca.crt文件,查了下他的路径,发现是个软连接,指向/etc/rhsm/ca/redhat-uep.pem这个文件,而这个文件并不存在

[root@10-10-20-180 docker]# ll /etc/docker/certs.d/registry.access.redhat.com/redhat-ca.crt
lrwxrwxrwx. 1 root root 27 Nov 13 17:20 /etc/docker/certs.d/registry.access.redhat.com/redhat-ca.crt -> /etc/rhsm/ca/redhat-uep.pem

然后谷歌一圈,有个回复提示了一下:https://github.com/minishift/minishift/issues/2194

解决办法
  1. 找到redhat-uep.pem文件
find / -name "redhat-uep.pem"
/var/lib/docker/overlay2/75966419af8c75d9b69a80b6dc3413c9ddd31522ab24385741c2ab77b998190c/diff/etc/rhsm/ca/redhat-uep.pem
  1. 拷贝到/etc/rhsm/ca 目录下面
cp /var/lib/docker/overlay2/75966419af8c75d9b69a80b6dc3413c9ddd31522ab24385741c2ab77b998190c/diff/etc/rhsm/ca/redhat-uep.pem /etc/rhsm/ca
  1. 执行拉取命令
[root@10-10-20-180 docker]# docker pull registry.access.redhat.com/rhel7
Using default tag: latest
Trying to pull repository registry.access.redhat.com/rhel7 ...
latest: Pulling from registry.access.redhat.com/rhel7
50a402dbfd72: Pull complete
c6796217be8f: Pull complete
Digest: sha256:7ae7375bdbb23180d21dfed3408ba82f0d00dd049557cd62716a628367d31d61
Status: Downloaded newer image for registry.access.redhat.com/rhel7:latest
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值