How to access host port from docker container

前端 未结 14 1535
南旧
南旧 2020-11-22 03:41

I have a docker container running jenkins. As part of the build process, I need to access a web server that is run locally on the host machine. Is there a way the host web s

14条回答
  •  有刺的猬
    2020-11-22 04:03

    Currently the easiest way to do this on Mac and Windows is using host host.docker.internal, that resolves to host machine's IP address. Unfortunately it does not work on linux yet (as of April 2018).

提交回复
热议问题