Unable to access local network IP from docker container

后端 未结 4 734
生来不讨喜
生来不讨喜 2021-02-05 21:35

Running macOS and docker ubuntu on it, I am unable to ping my local network\'s IP addresses. Below is the network configuration of my docker container. I can ping my host machin

4条回答
  •  [愿得一人]
    2021-02-05 22:04

    I was using docker for mac, the issue was docker internal network conflicting with my local network addressing. To resolve the this issue, i need to go to Preferences in the dokcer menu. In Preferences menu Daemon>Advanced Menu, i can supply other bip.

    {
        "bip" : "12.12.0.1/24"
    }
    

    Click apply and restart. The next time docker will start with internal network as 12.12.0.1/24.

提交回复
热议问题