How to access host port from docker container

前端 未结 14 1843
南旧
南旧 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:02

    I created a docker container for doing exactly that https://github.com/qoomon/docker-host

    You can then simply use container name dns to access host system e.g. curl http://dockerhost:9200

提交回复
热议问题