Docker host-only cidr conflicts with the network address of a host interface

 

machine VM unreachable if the virtualbox host-only network conflicts with one of the machine host's network interfaces #3060

 https://github.com/docker/machine/issues/3060

里面提到了原因:因为docker想使用的IP段跟你的主机所使用的IP段重复了,解决方法就是删除docker镜像,创建的时候使用另一个IP段。

用Notpade++打开C:\Program Files\Docker Toolbox\start.sh文件 
找到STEP="Checking if machine $VM exists"下面的"${DOCKER_MACHINE}" create -d virtualbox $PROXY_ENV "${VM}" 
然后在这句中加上--virtualbox-hostonly-cidr "192.168.162.1/24" 
即:

"${DOCKER_MACHINE}" create --virtualbox-hostonly-cidr "192.168.162.1/24" -d virtualbox $PROXY_ENV "${VM}"
  • 1

然后从VirtualBox中删除default镜像文件,重新运行Docker Quickerstart Terminal就可以了。

猜你喜欢

转载自sunwonder.iteye.com/blog/2395104