在本地windows安装完Docker的toolbox,怎么把镜像源更换为阿里云或daocloud的镜像源?
黄舟
黄舟 2017-04-24 09:10:00
0
2
670

在本地windows安装完Docker的Toolbox,怎么把默认的Docker Hub镜像源更换为阿里云或daocloud的镜像源?

黄舟
黄舟

人生最曼妙的风景,竟是内心的淡定与从容!

reply all(2)
大家讲道理

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

  1. Execute on the windows command linedocker-machine ssh [machine-name]Enter VM bash

  2. sudo vi /var/lib/boot2docker/profile

  3. at --label provider=virtualbox的下一行添加--registry-mirror https://xxxxxxxx.mirror.aliyuncs.com1

  4. Restart 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

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

  1. 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
  2. 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


  1. https://xxxxxxxx.mirror.aliyuncs.comNeeds to be replaced with your own image accelerator address on the cloud service provider ↩
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template