京东6.18大促主会场领京享红包更优惠

 找回密码
 立即注册

QQ登录

只需一步,快速开始

Docker镜像拉取失败题目分析及办理方案

2024-11-3 15:59| 发布者: 8b79| 查看: 138| 评论: 0

摘要: 目录题目及分析办理方案1.先排查DNS2.修改源3.代理设置4.重启docker服务题目办理总结 题目及分析 本日我用docker拉取镜像的时间报错 [code]error pulling image configuration: download failed after attempts
目录

题目及分析

本日我用docker拉取镜像的时间报错

[code]error pulling image configuration: download failed after attempts=6: dial tcp xxx.xx.xxx.xx:xxx: i/o timeout[/code]

连接超时大概率以下两个题目

1.DNS设置有误

2.镜像源设置题目

3.代理题目

办理方案

1.先排查DNS

检查resolv.conf中是否包含8.8.8.8和8.8.4.4

[code]sudo vim /etc/resolv.conf [/code]

在这里插入图片描述

包含阐明DNS没题目大概率就是源的题目

2.修改源

进入daemon.json(如果没有手动创建)

[code]sudo vim /etc/docker/daemon.json [/code]

添加

[code]{ "registry-mirrors": [ "https://docker.m.daocloud.io", "https://dockerproxy.com", "https://docker.mirrors.ustc.edu.cn", "https://docker.nju.edu.cn", "https://iju9kaj2.mirror.aliyuncs.com", "http://hub-mirror.c.163.com", "https://cr.console.aliyun.com", "https://hub.docker.com", "http://mirrors.ustc.edu.cn" ] } [/code]

在这里插入图片描述

3.代理设置

如果有代理的话必要设置,没有的话就不必要

进入proxy.conf(如果没有的话手动创建)

[code]sudo vim /etc/systemd/system/docker.service.d/proxy.conf [/code]

添加:

[code][Service] Environment="HTTP_PROXY=http://xxx.xxx.xxx.xxx:xxxx/" Environment="HTTPS_PROXY=http://xxx.xxx.xxx.xxx:xxxx/" Environment="NO_PROXY=localhost,127.0.0.1,xxx.xxx.xxx.xxx" [/code]

4.重启docker服务

[code]sudo systemctl daemon-reload sudo systemctl restart docker [/code]

题目办理

搞定

在这里插入图片描述

总结 

到此这篇关于Docker镜像拉取失败题目分析及办理方案的文章就介绍到这了,更多相关Docker镜像拉取失败内容请搜刮脚本之家以前的文章或继续欣赏下面的相关文章希望各人以后多多支持脚本之家!


来源:https://www.jb51.net/server/326468lg1.htm
免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!
关闭

站长推荐上一条 /6 下一条

QQ|手机版|小黑屋|梦想之都-俊月星空 ( 粤ICP备18056059号 )|网站地图

GMT+8, 2025-7-1 18:23 , Processed in 0.029582 second(s), 19 queries .

Powered by Mxzdjyxk! X3.5

© 2001-2025 Discuz! Team.

返回顶部