Docker pull “意外的 EOF" [英] Docker pull “unexpected EOF”

查看:85
本文介绍了Docker pull “意外的 EOF"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在使用 docker 时遇到了问题.场景是这样的:我们使用Codebuild+Packer+docker创建AMI,用于deploy.在这一步中,我们从人工制品中提取图像,并且除了提取 >1Gb.多次重试后失败并显示错误:下载失败,重试:未知 blob,然后是意外 EOF".你遇到过这样的问题吗?任何意见或建议都非常感谢.

I faced an issue with docker. The scenario is like this: we use Codebuild+Packer+docker to create AMI, which is used in deploy. During this step we pull image from artifactory and all pass fine except pulling one of the layers which is > 1Gb. After several retries it fails with error: Download failed, retrying: unknown blob and then "unexpected EOF". Have you ever faced such issue? Any comments or advices are highly appreciated.

推荐答案

这主要是因为网络弱(因为我用的是移动热点)

This was mainly because of weak network ( as I was using mobile hotspot )

配置docker daemon以减少tcp数据包

$ dockerd --max-concurrent-downloads <int>  

此处建议您要同时下载的 docker pull 层数.
默认为 3

here <int> suggests the number of docker pull layers you want to download concurrently.
default is 3

在我的情况下,我已经设置为 2

in mycase i had set to 2

$ dockerd --max-concurrent-downloads 2 &>/dev/null  

这样做的缺点是牺牲了您的宝贵时间:)
像地狱一样需要时间

downside of doing this is sacrificing your precious time :)
takes time like hell

这篇关于Docker pull “意外的 EOF"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆