Docker按顺序下载层 [英] Docker download layers sequentially

查看:65
本文介绍了Docker按顺序下载层的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有一种方法可以使docker依次而不是并行下载图像的各层。由于我们的存储库对网络问题非常严格(或躲避),因此我需要这样做。我收到很多EOF错误,例如:

is there a way to make docker download the layers of an image sequentially instead of in parallel. I require this due to our repository being very strict (or dodgey) on networking issues. I get a lot of the EOF errors like:

time="2016-06-14T13:15:52.936846635Z" level=debug msg="Error contacting registry http://repo.server/v1/: Get http://repo.server/v1/images/b6...be/layer: EOF"
time="2016-06-14T13:15:52.936924310Z" level=error msg="Download failed: Server error: Status 0 while fetching image layer (b6...be)"

这是在Windows上运行Docker 1.11.2的时候。

This is when running Docker 1.11.2 on windows.

但是在Centos7 VM上,一切正常默认值为1.9.1。

But on a Centos7 VM it all works fine with the default 1.9.1.

我注意到一个区别是1.9.1按顺序进行下载。因此,我尝试在Windows上安装1.9.1,但是快速启动终端会自动下载并安装boot1.2docker ISO的1.11.2版本。

I noticed one difference was that 1.9.1 does the downloads sequentially. So I tried to install 1.9.1 on windows, but the quick start terminal automatically downloaded and installed the 1.11.2 version of the boot2docker ISO.

所以有一些arg ,config或环境变量,我可以设置为让docker一次下载一层吗?

So is there some arg, config, or environment variable I can set to make docker download the layers one at a time?

还是假设并发下载引起我的错误,我是否跳到了错误的结论网络错误?

Or am I jumping to the wrong conclusion assuming the concurrent downloads are causing my network errors?

谢谢

推荐答案

似乎最近有在docker守护进程的配置中添加了 max-concurrent-downloads 选项。这是 docs 的链接,尽管我没有机会我自己测试一下。

It seems that there was recently added a max-concurrent-downloads option to the configuration of the docker daemon. Here is the link to the docs although I did not have a chance to test it yet myself.

这篇关于Docker按顺序下载层的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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