Solve the problem that the initialization of docker machine is too slow to download book2docker

Time:2021-1-27
When docker runs the docker machine create command, it will go to github.com Download the latest boot2 docker.iso  Mirror image.
Domestic downloads are slow and sometimes get stuck.

As shown in the figure:
Solve the problem that the initialization of docker machine is too slow to download book2docker

Solution 1: add proxy accelerator: (not easy to use)

[Alibaba accelerator] [1]: docker machine create -- Engine registry mirror= https://x6wyeo35.mirror.aliyuncs.com -d  virtualbox deephash-master
   [daocloud accelerator] [2]: docker machine create -- Engine registry mirror= http://f1361db2.m.daocloud.io -d  virtualbox deephash-master

Solution 2: download through the web and then specify the local path: (easy to use, recommended)

Step1: download to local via Google; https://github.com/boot2docker/boot2docker/releases/download/v18.09.0/boot2docker.iso  
   Step 2: move to destination path / users / luochenxi /. Docker / machine / cache
          Shell command: MV / users / luochenxi / downloads / boot2 docker.iso  /Users/luochenxi/.docker/machine/
   Step 3: specify local boot2 docker.iso , skip network check
          Shell command: docker machine create deep hash master - D VirtualBox -- VirtualBox boot2docker url = / users / luochenxi /. Docker / machine / cache / boot2 docker.iso

Implementation results:
Solve the problem that the initialization of docker machine is too slow to download book2docker

remarks:–virtualbox-boot2docker-urlBoot2 was manually specified docker.iso Location. If this parameter is not specified, the latest version will be downloaded directly from the network, which is very slow.

Recommended Today

Go carbon version 1.2.0 has been released to improve and optimize the multi scenario support for orm

Carbon is a lightweight, semantic and developer friendly golang time processing library, which supports chain call, lunar calendar, Gorm, xorm and other mainstream orm If you think it’s good, please give it to a star github:github.com/golang-module/carbon gitee:gitee.com/go-package/carbon Installation and use //Using GitHub Library go get -u github.com/golang-module/carbon import ( “github.com/golang-module/carbon”) //Using gitee Library go get […]