在本地windows安装完Docker的Toolbox,怎么把默认的Docker Hub镜像源更换为阿里云或daocloud的镜像源?
黄舟2017-04-24 09:12:00
Execute on the windows command linedocker-machine ssh [machine-name]
Enter VM bash
sudo vi /var/lib/boot2docker/profile
at --label provider=virtualbox
的下一行添加--registry-mirror https://xxxxxxxx.mirror.aliyuncs.com
1
Restart docker service: sudo /etc/init.d/docker restart
或者重启VM: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 document
Dockerfile image construction reference document
https://xxxxxxxx.mirror.aliyuncs.com
Needs to be replaced with your own image accelerator address on the cloud service provider ↩