I have a couple containers running on my host (Ubuntu Server), and I can access them on my network via host:port. I'm trying to use containers to replace IIS, so I'm trying to figure out how to assign hostnames to which the containers would respond, but I'm coming up short. Is there a way to have each container respond to the same ports (e.g., container1.example.com, container2.example.com), or does this necessitate some sort of appliance or reverse proxy sitting in front to forward from name.example.com to host:port?


It looks like you do want to put a reverse proxy in front, but you can do that with a container as well:




This also means you don't need to map the ports of the other containers to the host, just the one for the reverse proxy.

  • 1
    For plain docker, jwilder/nginx-proxy is what most people seem to use. – Michael Hampton Aug 3 '18 at 19:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.