docker運行 docker-machine create 命令第一次啓動會去github.com下載一個最新的boot2docker.iso 鏡像。 國內下載會很慢,有時會卡死。
如圖: git
解決方案1: 添加代理加速器:(不怎麼好用)github
[阿里加速器][1]:docker-machine create --engine-registry-mirror=https://x6wyeo35.mirror.aliyuncs.com -d virtualbox deephash-master [DaoCloud加速器][2]:docker-machine create --engine-registry-mirror=http://f1361db2.m.daocloud.io -d virtualbox deephash-master
解決方案2: 經過網頁下載而後指定本地路徑:(親測好用,推薦)docker
step1: 經過谷歌下載到本地;https://github.com/boot2docker/boot2docker/releases/download/v18.09.0/boot2docker.iso step2: 移動到目標路徑:/Users/luochenxi/.docker/machine/cache shell命令: mv /Users/luochenxi/Downloads/boot2docker.iso /Users/luochenxi/.docker/machine/ step3: 指定本地boot2docker.iso,跳過網絡check. shell命令:docker-machine create deephash-master -d virtualbox --virtualbox-boot2docker-url=/Users/luochenxi/.docker/machine/cache/boot2docker.iso
執行結果: shell
備註:--virtualbox-boot2docker-url手動指定了boot2docker.iso位置。若是不指定該參數,則會從網絡直接下載最新版本,很是緩慢。網絡