当前位置: 代码网 > it编程>开发工具>Docker > docker pull image 报错 dial tcp 31.13.88.169:443: i/o timeout

docker pull image 报错 dial tcp 31.13.88.169:443: i/o timeout

2024年08月02日 Docker 我要评论
error pulling image configuration: download failed after attempts=6: dial tcp 31.13.88.169:443: i/o timeout解决方法

一、错误重现

error pulling image configuration: download failed after attempts=6: dial tcp 31.13.88.169:443: i/o timeout

在执行docker build构建镜像,拉取镜像时报错

在这里插入图片描述

或者直接docker pull镜像时报错

在这里插入图片描述
实质都是拉取镜像源超时报错,那么就是镜像源的问题

二、解决方法

1、配置镜像源

vim /etc/docker/daemon.json

输入以下内容

{
	"registry-mirrors":[
		"https://i1el1i0w.mirror.aliyuncs.com",
		"https://hub-mirror.c.163.com",
		"https://registry.aliyuncs.com",
		"https://registry.docker-cn.com",
		"https://docker.mirrors.ustc.edu.cn"
	]
}

或者直接使用tee命令添加(二选一即可)

sudo tee /etc/docker/daemon.json <<-'eof'
{
	"registry-mirrors":[
		"https://i1el1i0w.mirror.aliyuncs.com",
		"https://hub-mirror.c.163.com",
		"https://registry.aliyuncs.com",
		"https://registry.docker-cn.com",
		"https://docker.mirrors.ustc.edu.cn"
	]
}
eof

2、重启docker服务

重启守护进程

sudo systemctl daemon-reload

重启服务

sudo systemctl restart docker

再次尝试成功了
(0)

相关文章:

版权声明:本文内容由互联网用户贡献,该文观点仅代表作者本人。本站仅提供信息存储服务,不拥有所有权,不承担相关法律责任。 如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件至 2386932994@qq.com 举报,一经查实将立刻删除。

发表评论

验证码:
Copyright © 2017-2025  代码网 保留所有权利. 粤ICP备2024248653号
站长QQ:2386932994 | 联系邮箱:2386932994@qq.com