How to pull layers one by one in Docker to avoid c

2020-02-25 07:29发布

I keep getting connection timeout while pulling an image:

enter image description here

First, it start downloading the 3 first layers, after one of them finished, the 4th layer try to start downloading. Now the problem is it won't start until the two reminded layers finish there download process, and before that happens (I think) the fourth layers fail to start downloading and abort the whole process. So I was thinking, if downloading the layers one by one would solve this problem. Or is there a way to download images manually with my browser?

标签: docker
2条回答
三岁会撩人
2楼-- · 2020-02-25 07:52

Please follow the step if docker running already Ubuntu:

sudo service docker stop
sudo dockerd --max-concurrent-downloads 1

Download your images after that stop this terminal and start the daemon again as it was earlier.

sudo service docker start
查看更多
Juvenile、少年°
3楼-- · 2020-02-25 07:55

The Docker daemon has a --max-concurrent-downloads option. According to the documentation, it sets the max concurrent downloads for each pull.

So you can start the daemon with dockerd --max-concurrent-downloads 1 to get the desired effect.

See the dockerd documentation for how to set daemon options on startup.

查看更多
登录 后发表回答