Theo Walton
Theo Walton

Reputation: 1105

Increase docker pull timeout

Sometimes when pulling images I will loose internet for around 3 minutes and then reconnect, but by then it is too late since docker pull usually times out. How can I change this default timeout, to say 10 minutes?

Upvotes: 15

Views: 11678

Answers (1)

mipo256
mipo256

Reputation: 3174

Unfortunately, you, as a client (who is pulling an image), cannot do that much in order to deal with it (at least for now).

The only thing I can suggest is to set the setting: --max-concurrent-downloads to 1. The thing is - Docker daemon, by default, is pulling 3 layers of images at a time (You can observe it in the official doc of dockerd). In this case, you are trying to download 3 layers simultaneously, and if the network interruption is encountered, and none of the layers have been downloaded yet, then, tough luck :)

If you set --max-concurrent-downloads to 1 you will instruct dockerd to concentrate network resources it posses in order to pull only one layer. In this case, you most probably will be able to pull it, before this network issue, and, in this case, dockerd will not pull it again - since this layer is already fully present. So, I am sorry, but this is how it is :)

Upvotes: 4

Related Questions