docker安装时host-only cidr conflicts with the network address of a host interface错误解决

Running pre-create checks...
Creating machine...
(default) Copying /Users/kaihuan/.docker/machine/cache/boot2docker.iso to /Users/kaihuan/.docker/machine/machines/default/boot2docker.iso...
(default) Creating VirtualBox VM...
(default) Creating SSH key...
(default) Starting the VM...
(default) Check network to re-create if needed...
**Error creating machine: Error in driver during machine creation: Error setting up host only network on machine start: 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 这个issue里面提到了原因:因为docker想使用的IP段跟你的主机所使用的IP段重复了,解决方法就是删除docker镜像,创建的时候使用另一个IP段。

docker-machine rm default

docker-machine create --driver --virtualbox-hostonly-cidr "10.10.10.1/24" virtualbox default

--virtualbox-hostonly-cidr : 文档中并没有将这个选项解释的很清楚,但基本上1是起始地址和24是检查是否可用范围内的地址数(24 is the number of addresses in the range to check if available),

执行过程截图

参考链接:

  1. Docker-machine - Error - IP address conflict with latest docker release
  2. Installation on Mac OS X
  3. Host-Only Networking
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • NAME dnsmasq - A lightweight DHCP and caching DNS server....
    ximitc阅读 7,938评论 0 0
  • 以下原文转载于(https://docs.docker.com/docker-for-mac/)(想找中文版的最新...
    Veekend阅读 12,228评论 0 17
  • [For Linux: add 'sudo' before all the commands] 1.image: ...
    于恺雯阅读 4,535评论 1 2
  • 你是否也有过一些想要记起却不敢记起的人?还有一些想要忘记却无法忘记的事? 我有,比如母亲,母亲的离世。 三年半了,...
    玉璃青阅读 3,517评论 2 1
  • #心颂# 昨天很累,但还是被生物钟拉扯着早起,没有戴表,阳光在指缝中充溢了眼眶。看不清时间。 这是一个...
    长安雨泠阅读 1,514评论 0 0