Home  >  Q&A  >  body text

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

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

黄舟黄舟2707 days ago634

reply all(2)I'll reply

  • 大家讲道理

    大家讲道理2017-04-24 09:12:00

    Alibaba Cloud Source’s website has a link to the documentation

    reply
    0
  • 黄舟

    黄舟2017-04-24 09:12:00

    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 ↩

    reply
    0
  • Cancelreply