What is linux equivalent of “host.docker.internal”

前端 未结 9 1185
面向向阳花
面向向阳花 2020-12-02 09:37

On Mac and Windows it is possible to use docker.for.mac.host.internal (replaces docker.for.mac.localhost) and docker.for.win.host.int

9条回答
  •  南笙
    南笙 (楼主)
    2020-12-02 10:31

    Using the docker0 interface ip, say 172.17.0.1, could be a good workaround.

    Just be sure that the service you need to reach listens to external connections. A typical example is Mysql who binds to 127.0.0.1 by default, resulting unreachable until you allow external connections (es. binding to 0.0.0.0)

提交回复
热议问题