Switch the image source of docker to Alibaba Cloud
1. Register an account
https://dev.aliyun.com/search.html
Alibaba Cloud will automatically assign the user an address of an image accelerator. After logging in, go to "Administration Center" --> "Accelerator", which contains the address of the image accelerator assigned to you and the usage instructions for each environment.
2. Activate the accelerator function of the docker image source
Execute docker-machine ssh [machine-name] on the windows command line (CMD) to enter the VM bash
Example: docker-machine ssh default
sudo vi /var/lib/boot2docker/profile
Add --label provider=virtualbox on the next line of --label provider=virtualbox registry-mirror https://xxxxxxxx.mirror.aliyuncs.com1
Restart the docker service: sudo /etc/init.d/docker restart or restart the VM: exit to exit the VM bash, execute docker-machine restart on the windows command line
It is recommended to use the following commands to create the easiest and most convenient:
docker-machine rm default docker-machine create --engine-registry-mirror=https://xxxx.mirror.aliyuncs.com -d virtualbox default