在本地windows安装完Docker的Toolbox,怎么把默认的Docker Hub镜像源更换为阿里云或daocloud的镜像源?
人生最曼妙的风景,竟是内心的淡定与从容!
Alibaba Cloud Source’s website has a link to the documentation
Execute on the windows command linedocker-machine ssh [machine-name]Enter VM bash
docker-machine ssh [machine-name]
sudo vi /var/lib/boot2docker/profile
at --label provider=virtualbox的下一行添加--registry-mirror https://xxxxxxxx.mirror.aliyuncs.com1
--label provider=virtualbox
--registry-mirror https://xxxxxxxx.mirror.aliyuncs.com
Restart docker service: sudo /etc/init.d/docker restart或者重启VM:exit退出VM bash,在windows命令行中执行docker-machine restart
sudo /etc/init.d/docker restart
exit退出VM bash,在windows命令行中执行docker-machine restart
Install/upgrade your Docker client For users below Windows 10, it is recommended to use Docker Toolbox Toolbox introduction and help: http://mirrors.aliyun.com/hel... Installation file directory for Windows system: http://mirrors.aliyun.com/doc... For users above Windows 10, it is recommended to use Docker for Windows Installation file directory for Windows system: http://mirrors.aliyun.com/doc... How to use Docker accelerator Create a Linux virtual machine with 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 machine's environment configuration, configure it locally, and access the Docker service through the Docker client. docker-machine env default eval "$(docker-machine env default)" docker info Related documents Docker command reference documentDockerfile image construction reference document
For users below Windows 10, it is recommended to use Docker Toolbox
Toolbox introduction and help: http://mirrors.aliyun.com/hel...
Installation file directory for Windows system: http://mirrors.aliyun.com/doc...
For users above Windows 10, it is recommended to use Docker for Windows
Create a Linux virtual machine with 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 machine's environment configuration, configure it locally, and access the Docker service through the Docker client.
docker-machine env default eval "$(docker-machine env default)" docker info
Docker command reference documentDockerfile image construction reference document
https://xxxxxxxx.mirror.aliyuncs.com
Alibaba Cloud Source’s website has a link to the documentation
For the created Docker Machine instance, the method to change the image source is as follows
Execute on the windows command line
docker-machine ssh [machine-name]
Enter VM bashsudo vi /var/lib/boot2docker/profile
at
--label provider=virtualbox
的下一行添加--registry-mirror https://xxxxxxxx.mirror.aliyuncs.com
1Restart docker service:
sudo /etc/init.d/docker restart
或者重启VM:exit退出VM bash,在windows命令行中执行docker-machine restart
If you are creating a new Docker Machine instance, refer to Alibaba Cloud’s operating documentation
https://xxxxxxxx.mirror.aliyuncs.com
Needs to be replaced with your own image accelerator address on the cloud service provider ↩