specify ip address for docker for mac

不羁岁月 提交于 2019-12-04 10:49:00

问题


I'm using Docker for Mac Beta and it runs from spotlight.

Is there any way to run it from console or force to use any configuration file to specify ip address for docker host.

Right now it changing from 192.168.64.3 to 192.168.64.5 (each start of docker it can have any random IP)

probably I need to configure bridge interface?

com.docker.network.bridge.enable_ip_masquerade: true
com.docker.network.bridge.host_binding_ipv4: 0.0.0.0

Does anyone know how to do that?


回答1:


You can connect to the Docker alpine host via unix socket but I have not been able to figure out how to bridge to the network.

The docs say:

Unfortunately, due to limtations in OSX, we’re unable to route traffic to containers, and from containers back to the host.

Because of the way networking is implemented in Docker for Mac, you cannot see a docker0 interface in OSX. This interface is actually within HyperKit.



来源:https://stackoverflow.com/questions/36895461/specify-ip-address-for-docker-for-mac

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!