docker image taken from the pull aliyun

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
Here Insert Picture Description
2. select console - "products and services -" mirror container service
Here Insert Picture Description
selected image accelerator, select centos, get the address of a mirror accelerator
Here Insert Picture Description
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
Here Insert Picture Description
4. Obtain the desired image by docker pull command
example, we updated our nginx mirrored version
first to see our version of nginx
Here Insert Picture Description
can see our nginx is 1.13 version
and then pull nginx mirror
Here Insert Picture Description
and then check the version again
Here Insert Picture Description
successfully updated to version 1.15

Guess you like

Origin blog.csdn.net/weixin_42446031/article/details/90756033