Using Consul, how can I assign domain names to containers?

171 views Asked by At

I am trying to setup a consul, registrator, docker setup and I am wondering how when a container registers itself, I can assign it a domain name so it can start to receive requests.

It could be various containers, with various functionalities, domains such as: user.mycompany.com, product-list.mycompany.com, etc, etc

So each container would have to know what domain it should be registered under, or consul should know each container name and what domain configuration it should give it?

Thing is, I want real domain names, internet accessible ones, not things like .consul

Anybody know how? or can point me in the right direction?

1

There are 1 answers

0
Sean On

Use nomad because if your Nomad cluster has access to a Consul cluster, Nomad will dynamically register and deregister Consul servers for your containers. See the Nomad service discovery section for additional details.