After installing Docker’s Toolbox in local windows, how to replace the default Docker Hub mirror source with Aliyun or daocloud mirror source?
For an instance of Docker Machine that has been created, replace the mirror source as follows
Execute on windows Command Line
docker-machine ssh [machine-name]
Enter VM bash
sudo vi /var/lib/boot2docker/profile
In
--label provider=virtualbox
Add to the next line of--registry-mirror https://xxxxxxxx.mirror.aliyuncs.com
1Restart the docker service:
sudo /etc/init.d/docker restart
Or restart the VM:Exit exits VM bash and executes docker-machine restart on the windows command line.
If you are creating a new Docker Machine instance, refer to Aliyun’sOperation document
Install/upgrade your Docker client
Recommended for users under Windows 10Docker Toolbox
Toolbox introduction and help:http://mirrors.aliyun.com/hel …
Directory of installation files for Windows system:http://mirrors.aliyun.com/doc …
Recommended for Windows 10+usersDocker for Windows
Directory of installation files for Windows system:http://mirrors.aliyun.com/doc …
How to Use Docker Accelerator
Create a Linux virtual machine with a Docker environment installed, specify the machine name as default, and configure the Docker accelerator address.
docker-machine create --engine-registry-mirror=https://xxxxxxxx.mirror.aliyuncs.com[^2] -d virtualbox default
View the environment configuration of the machine, configure it locally, and access the Docker service through the Docker client.
docker-machine env default eval "$(docker-machine env default)" docker info
Relevant documents
Docker command reference documentation
Dockerfile mirror build reference document
https://xxxxxxxx.mirror.aliyuncs.com
You need to replace it with your mirror accelerator address at the cloud service provider.↩