In one of my test setups, I have code which is sometimes runs inside a docker container that wants to connect to a port on the host machine.
It is configured to try to connect to localhost:12345. That works when it is running outside the container, but obviously fails when it runs inside the container.
Is there a way to map a port on the local host into the container? This is the reverse of the normal port mapping, where you expose a port in the container to the host.
I can see potential security issues with this, and also that it breaks the paradigm of "the container is the world", so I would not be surprised if it is not supported.