I’m generally pretty comfortable with Docker, but I need to do something that has me stumped.
I have a Traefik server running in a Docker container that listens on ports 80 and 443 of the host. I use this container to reverse proxy to a variety of other services all running in Docker containers as well.
Now, however, I am adding a new service that, for a variety of reasons, needs to run using host network mode. I want this service to be accessible via a subdomain on port 443. The service itself listens on port 8192 on the host. So what I need to do is simply set up a reverse proxy from myservice.mydomain.com to 0.0.0.0:8192 on the host.
I am not sure how to do this. How can I proxy traffic from with a non-host mode container (my Traefik reverse proxy) to a port on the host’s network stack? More generally, how can I write data to a port on the host from within a Docker container? Is this even possible?
Thanks for your help.