Running multiple sites inside containers on one host. How can I get each domain’s DNS to point at each container?

Hi all,

Say my server IP is

I have one container running and the DNS is setup as:

a @ 

This works a treat. I have traefik setup, everything dockerised (including traefik) so it does all the routing etc. Life is happy.

I then purchased a new domain and have installed a second container. This one runs on a different port (let's say 8000).

The server IP is still the same though, and if I try and do something like this in my DNS settings:

a @ 

… it just won't let me. It won't allow for ports.

So how can I make traffic come into the one server but go do different ports depending on the domain name?

Any help would be highly appreciated.

submitted by /u/swiftrob
[link] [comments]
Source: Reddit