Docker Image Acceleration
Pulling images from DockerHub in China can sometimes be difficult; in that case you can configure an image accelerator.
Currently domestic Docker image sources have some problems and are basically unusable; I will update this later when they work again.
Docker's official site and many domestic cloud providers offer domestic accelerator services, for example:
- USTC mirror:https://docker.mirrors.ustc.edu.cn/
- NetEase:https://hub-mirror.c.163.com/
- Alibaba Cloud:https://
.mirror.aliyuncs.com - Qiniu Cloud accelerator:https://reg-mirror.qiniu.com
After configuring an accelerator address, if you cannot pull images, switch to another accelerator address. Major domestic cloud providers all offer Docker image acceleration services; it is recommended to choose the corresponding acceleration service based on the cloud platform running Docker.
Alibaba Cloud image address:https://cr.console.aliyun.com/cn-hangzhou/instances/mirrors, after logging in, select Image Accelerator in the left menu to see your dedicated address:

Previously there was also the official Docker accelerator https://registry.docker-cn.com , but now it seems unusable. We can add several domestic mirrors; if one is unusable, it will switch to a usable mirror for pulling.
Ubuntu14.04、Debian7Wheezy
For systems using upstart, edit the /etc/default/docker file and configure the accelerator address in DOCKER_OPTS:
DOCKER_OPTS="--registry-mirror=https://registry.docker-cn.com"
Restart the service:
$ sudo service docker restart
Ubuntu16.04+、Debian8+、CentOS7
For systems using systemd, write the following content into /etc/docker/daemon.json (create the file if it does not exist):
{"registry-mirrors":["https://reg-mirror.qiniu.com/"]}
Then restart the service:
$
sudo
systemctl daemon-reload
$
sudo
systemctl restart docker
Windows 10
For Windows 10 systems, right-click the Docker icon in the system tray in the lower-right corner and select Settings; after the configuration window opens, select Daemon in the left navigation menu. Fill in the accelerator address in the Registrymirrors field https://docker.mirrors.ustc.edu.cn/ , then click Apply to save; Docker will restart and apply the configured mirror address.

Mac OS X
For Mac OS X users, click the Docker for mac application icon in the taskbar -> Perferences... -> Daemon -> Registrymirrors. Fill in the accelerator address in the list https://reg-mirror.qiniu.com . After modification, click the Apply&Restart button; Docker will restart and apply the configured mirror address.

Check whether the accelerator is effective
Check whether the accelerator is effective: After configuring the accelerator, if pulling images is still very slow, manually check whether the accelerator configuration is effective. Run docker info on the command line; if you see the following content in the result, the configuration is successful.
$ docker info
Registry Mirrors:
https://reg-mirror.qiniu.com