thought it will be much simpler, but I couldn't find a satisfying solution.
I wish to forward any messages coming from the container on a specific port to the host, but not the opposite(messages coming from the host should not be forwarded to the container).
Setup
- host, running a web server on port 9880.
- docker container(on the same host), that should forward any messages on port 9880 on the inner container localhost to the webserver running on the host on port 9880.
Requirements
- any requests coming from the host/outside world to port 9880 should arrive to the webserver running on the host on port 9880. any request from within the container on port 9880 should be forwarded to webserver on the host as well.
Limitations
- docker on windows - so no option for 'host' docker network.
- I would like to rely on the ports only and not on the IP of the containers because this setup is going to be installed on a number of hosts and I prefer a solution that would work always with no need to check it and change configurations.