Reason for replacement
The official mirror of Docker's visit to the country has been slow as a snail. In order to quickly access Docker official image will be configured with three-side accelerator, the current common three-party accelerator: NetEase, USTC, Daocloud, Aliyun.
Now Docker has launched a mirror-acceleration service for the Chinese region. With Docker official image acceleration, domestic users are able to access the most popular Docker mirrors with faster download speeds and greater stability. How to use official mirrors
Docker China official image acceleration can be accessed through registry.docker-cn.com. The Mirror library currently contains only popular public mirrors, while private mirrors still need to be pulled from the US mirror library.
You can use the following command to pull directly from the mirrored acceleration address.
Docker Pull Registry.docker-cn.com/myname/myrepo:mytag
Examples are as follows:
Docker Pull registry.docker-cn.com/library/ubuntu:16.04
Note: Unless you modify the –registry-mirror parameters of the Docker daemon, you will need to fully specify the name of the official mirror. For example, Library/ubuntu, Library/redis, Library/nginx. configuring accelerators for the Docker daemon
Start Docker with the configuration file, modify the/etc/docker/daemon.json file, and add the Registry-mirrors key value.
sudo vim/etc/docker/daemon.json
{
' registry-mirrors ': [' https://registry.docker-cn.com ']
}
Also can choose NetEase's Mirror address: http://hub-mirror.c.163.com
{
"Registry-mirrors": ["http://hub-mirror.c.163.com"]
}
After modifying the save, restart the Docker for the configuration to take effect.
sudo service docker restart
Then the speed went up a step.
Reference Documentation:
Docker documentation
Docker Domestic mirror source settings
Docker change the official mirror of the country
Configuring the official domestic speed mirror for Docker