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"
相关推荐
gordon~911 分钟前
Windows 11 wsl 中安装的Ubuntu-24.04 中装docker
windows·ubuntu·docker
倔强的胖蚂蚁11 分钟前
openEuler 24.03 LTS SP3 motd标志区使用教程
运维·云原生
皮卡蛋炒饭.34 分钟前
Ext系列文件系统
运维
齐齐大魔王39 分钟前
linux-核心工具
linux·运维·服务器
醇氧39 分钟前
Linux 系统的启动过程
linux·运维·服务器
IMPYLH40 分钟前
Linux 的 dircolors 命令
linux·运维·服务器·数据库
齐齐大魔王43 分钟前
linux-基础操作
linux·运维·服务器
进击切图仔1 小时前
Docker + tmux + ROS:持久化的机器人开发环境
docker·容器·机器人
一个有温度的技术博主1 小时前
网安实验系列二:服务器信息收集
运维·服务器
bwz999@88.com1 小时前
ubuntu24.04更换国内源
linux·运维·服务器