How to pull layers one by one in Docker to avoid connection timeout?

前端 未结 2 2075
无人共我
无人共我 2020-12-30 03:21

I keep getting connection timeout while pulling an image:

First, it starts downloading the 3 first layers, after one of them finish, the 4th layer try to

相关标签:
2条回答
  • 2020-12-30 03:44

    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.

    0 讨论(0)
  • 2020-12-30 03:46

    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
    
    0 讨论(0)
提交回复
热议问题