运维系列:docker安装并拉取镜像(missing signature key、Error response from daemon、x509: certificate has expired o)
坦笑&&life 2024-06-14 17:37:02 阅读 80
docker安装并拉取镜像(missing signature key、Error response from daemon、x509: certificate has expired o)
1. docker安装2. docker拉取镜像错误 missing signature key当我使用docker拉取一个特定的镜像时,提示错误。解决方案:总结 3. Docker pull拉取镜像报错“Error response from daemon: Get “https://registry-1.docker.io/v2”解决办法一、报错信息二、检查daemon.json 文件1.编辑daemon.json2.重启服务 三、查看dns解析四、添加host解析五、重新拉取镜像 4. Docker报错:x509: certificate has expired or is not yet valid一、问题描述二、解决问题两种情况:1、检查系统时间2、检查证书问题
1. docker安装
yum install -y yum-utils device-mapper-persistent-data lvm2
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
yum install docker-ce-17.12.0.ce
systemctl enable docker
systemctl start docker
2. docker拉取镜像错误 missing signature key
当我使用docker拉取一个特定的镜像时,提示错误。
docker pull apache/apisix:3.2.2-centosError response from daemon: missing signature key
但我拉取其他镜像就可以访问。
例如
docker pull mongo:4.4.6
解决方案:
卸载当前版本docker
yum erase docker \ docker-client \ docker-client-latest \ docker-common \ docker-latest \ docker-latest-logrotate \ docker-logrotate \ docker-selinux \ docker-engine-selinux \ docker-engine \ docker-ce
下载最新版docker
yum install docker-ce -y
总结
应该是版本过低,导致与对应镜像版本不兼容导致的
3. Docker pull拉取镜像报错“Error response from daemon: Get “https://registry-1.docker.io/v2”解决办法
一、报错信息
[root@node ~]# docker pull o2oa/o2serverUsing default tag: latestError response from daemon: Head "https://registry-1.docker.io/v2/o2oa/o2server/manifests/latest": net/http: TLS handshake timeout
二、检查daemon.json 文件
1.编辑daemon.json
可额外添加网易163的镜像加速
[root@node ~]# cat /etc/docker/daemon.json{ "registry-mirrors": ["https://registry.docker-cn.com","http://hub-mirror.c.163.com"]}
2.重启服务
systemctl daemon-reload
systemctl restart docker
三、查看dns解析
[root@node ~]# dig @114.114.114.114 registry-1.docker.io; <<>> DiG 9.9.4-RedHat-9.9.4-72.el7 <<>> @114.114.114.114 registry-1.docker.io; (1 server found);; global options: +cmd;; Got answer:;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 37194;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 0, ADDITIONAL: 1;; OPT PSEUDOSECTION:; EDNS: version: 0, flags:; udp: 512;; QUESTION SECTION:;registry-1.docker.io.INA;; ANSWER SECTION:registry-1.docker.io.32INA44.194.5.25registry-1.docker.io.32INA44.207.96.114registry-1.docker.io.32INA44.207.51.64;; Query time: 31 msec;; SERVER: 114.114.114.114#53(114.114.114.114);; WHEN: Sat Aug 13 23:16:55 CST 2022;; MSG SIZE rcvd: 97
四、添加host解析
[root@node ~]# cat /etc/hosts127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4::1 localhost localhost.localdomain localhost6 localhost6.localdomain644.194.5.25 registry-1.docker.io
五、重新拉取镜像
[root@node ~]# docker pull o2oa/o2serverUsing default tag: latestlatest: Pulling from o2oa/o2server125a6e411906: Pull complete afe724e20696: Pull complete fde7ffb259f7: Pull complete 5aec3a1a0b3a: Pull complete
4. Docker报错:x509: certificate has expired or is not yet valid
一、问题描述
Docker pull镜像的时候 出现错误
x509: certificate has expired or is not yet valid
二、解决问题
x509: certificate has expired or is not yet validX509:证书已过期或尚未有效
两种情况:
证书已经过期了
证书是没有问题的,但是系统时间不对
1、检查系统时间
[root@localhost ~]# date
系统时间不对 修改系统时间
更新时间同步即可:
ntpdate cn.pool.ntp.org
如果提示不存在 ntpdate 命令需要先安装该命令:
yum install ntpdate
修改完成后
2、检查证书问题
如果是证书的问题需要编辑 daemo.json 文件:
vi /etc/docker/daemon.json
文件内添加:
{ "registry-mirrors":["https://b9pmyelo.mirror.aliyuncs.com"]}
然后重启下 docker 服务:
systemctl restart docker
qq_39825717
docker拉取镜像错误 missing signature key
江湖有缘
Docker pull拉取镜像报错“Error response from daemon: Get “https://registry-1.docker.io/v2”解决办法
努力冲
Docker报错:x509: certificate has expired or is not yet valid
上一篇: Docker 容器日志清理
下一篇: 【MySQL】Navicat/SQLyog连接Ubuntu中的数据库(MySQL)
本文标签
运维系列:docker安装并拉取镜像(missing signature key、Error response from daemon、x509: certificate has expired o)
声明
本文内容仅代表作者观点,或转载于其他网站,本站不以此文作为商业用途
如有涉及侵权,请联系本站进行删除
转载本站原创文章,请注明来源及作者。