Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Increase docker pull timeout

Tags:

docker

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?

like image 788
Theo Walton Avatar asked Jan 22 '19 17:01

Theo Walton


People also ask

How do I increase my docker rate limit?

For anonymous users, the rate limit is set to 100 pulls per 6 hours per IP address. For authenticated users, it is 200 pulls per 6 hour period. Users with a paid Docker subscription get up to 5000 pulls per day. If you require a higher number of pulls, you can also purchase an Enhanced Service Account add-on.

Does docker have a timeout?

If your docker start and docker create API calls take longer than four minutes, then AWS Batch returns a DockerTimeoutError error. Note: The default timeout limit set by the Amazon Elastic Container Service (Amazon ECS) container agent is four minutes.

Does docker always pull latest?

By default, Docker pulls the latest version. To ensure it does so, you can add the :latest tag.

How long does a container stay in the running state?

2.3. The container, by default, runs in the foreground unless explicitly detached using the -d flag. The container runs as long as the specified command keeps running and then stops.


1 Answers

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 :)

like image 108
misha2048 Avatar answered Sep 27 '22 18:09

misha2048