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:
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:
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.