Preface:
We can not avoid downloading mirror when using docker, but for various reasons, we could not download the image from the foreign website, or download speed is too slow, then when we encounter such a situation can from some of our domestic docker download warehouse, where I recommend Ali cloud mirrored warehouse
first, the use of mirrored Ali cloud accelerator, accelerate our download speeds
1. first we need to have its own Ali cloud account, log in https://www.aliyun.com self-registration
2. select console - "products and services -" mirror container service
selected image accelerator, select centos, get the address of a mirror accelerator
3. New file daemon.json file in the / etc / docer directory, the accelerator write, note that the host can have their own premise networking
[root@server1 docker]# cd /etc/docker/
[root@server1 docker]# ls
key.json
[root@server1 docker]# vim daemon.json
[root@server1 docker]# cat daemon.json
{
"registry-mirrors": ["https://gfo5dro8.mirror.aliyuncs.com"]
}
[root@server1 docker]# systemctl daemon-reload
[root@server1 docker]# systemctl restart docker
4.docker search, if you can search for, then the accelerator to build a successful
4. Obtain the desired image by docker pull command
example, we updated our nginx mirrored version
first to see our version of nginx
can see our nginx is 1.13 version
and then pull nginx mirror
and then check the version again
successfully updated to version 1.15