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?
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.
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.
By default, Docker pulls the latest version. To ensure it does so, you can add the :latest tag.
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.
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 :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With