docker pull 相关配置

bash 复制代码
cat /etc/docker/daemon.json 
bash 复制代码
{
    "max-concurrent-downloads": 30,
    "max-download-attempts": 10,
}

参数解释:

"max-concurrent-downloads":30, 最多一次性拉取 30 层

"max-download-attempts": 10, 最多重试10次

从 /var/log/syslog 日志可知,dokcer 拉取某层失败会重试,默认重试次数为 5 ,"max-download-attempts": 10, 可以将失败重试次数改为 10

bash 复制代码
Jan  8 14:36:37 m4 dockerd[112390]: time="2024-01-08T14:36:37.144264291+08:00" level=info msg="Download failed, retrying (1/10): unexpected EOF"
Jan  8 14:41:09 m4 dockerd[112390]: time="2024-01-08T14:41:09.315140436+08:00" level=info msg="Download failed, retrying (2/10): unexpected EOF"
Jan  8 14:50:12 m4 dockerd[112390]: time="2024-01-08T14:50:12.149905672+08:00" level=info msg="Download failed, retrying (3/10): unexpected EOF"
Jan  8 14:54:55 m4 dockerd[112390]: time="2024-01-08T14:54:55.540293984+08:00" level=info msg="Download failed, retrying (4/10): unexpected EOF"
Jan  8 15:04:09 m4 dockerd[112390]: time="2024-01-08T15:04:09.474033826+08:00" level=info msg="Download failed, retrying (5/10): unexpected EOF"
相关推荐
Full Stack Developme20 小时前
Linux 多种压缩格式,优缺点和适用场景
linux·运维·服务器
yBmZlQzJ1 天前
财运到内网穿透域名解析技术机制与中立评估
运维·经验分享·docker·容器·1024程序员节
Shanxun Liao1 天前
Cenots 7.9 配置多台 SSH 互信登陆免密码
linux·运维·ssh
j_xxx404_1 天前
Linux:第一个程序--进度条|区分回车与换行|行缓冲区|进度条代码两个版本|代码测试与优化
linux·运维·服务器
一点晖光1 天前
jenkins优化记录
运维·jenkins
最贪吃的虎1 天前
Git: rebase vs merge
java·运维·git·后端·mysql
yBmZlQzJ1 天前
内网穿透工具通过端口转发实现内外网通信
运维·经验分享·docker·容器·1024程序员节
DeepHacking1 天前
Overleaf 本地Docker部署
运维·docker·容器
llilian_161 天前
总线授时卡 CPCI总线授时卡的工作原理及应用场景介绍 CPCI总线校时卡
运维·单片机·其他·自动化
乐迪信息1 天前
乐迪信息:煤矿皮带区域安全管控:人员违规闯入智能识别
大数据·运维·人工智能·物联网·安全