Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to optimise docker pull speed

Tags:

docker

Docker pull can be slow sometimes

How can this best be optimised?

Is it possible to set the mirrors?

Any ideas appreciated. I appreciate sometimes it can just be slow network but would be great to speed this up as much as possible.

like image 796
danday74 Avatar asked Apr 02 '16 11:04

danday74


1 Answers

Not exactly a mirror, but you can setup a registry as a pull through cache:

By running a local registry mirror, you can keep most of the redundant image fetch traffic on your local network.
In this mode a Registry responds to all normal docker pull requests but stores all content locally.

The first time you request an image from your local registry mirror, it pulls the image from the public Docker registry and stores it locally before handing it back to you.
On subsequent requests, the local registry mirror is able to serve the image from its own storage.

You will need to pass the --registry-mirror option to your Docker daemon on startup:

docker --registry-mirror=https://<my-docker-mirror-host> daemon
like image 96
VonC Avatar answered Nov 10 '22 01:11

VonC