Docker Community Forums

Share and learn in the Docker community.

Is there any way to map DNS namein URl to container instances residing in same Docker server?


If I have a linux server running docker, which has a number of containers, is there any way (other than a container reverse proxy) to map a given DNS name in a URL to a particular container?

So for instance, if I have running docker with a number of containers, and each container is hosting a tomcat instance with an SSL cert such as and testapplication2.mydomain.coml. Is there any way other than using a container reverse proxy to have dockerD map the DNS URL name to the right container?


Not possible. Either you resolve each subdomain to a different docker engine OR you will have to live with a reverse proxy / loadbalancer. If you want the container to terminate the traffic, you will need to setup a loadbalancer with SNI TCP Passthrough support. Nginx can be configured to act as such. Traefic 2.0 is able to act as such as well.