1

I am a new user of docker.io.

I want deploy multiple docker.io containers in one linode host, for example:

  • blog.xi3.io <--> docker container #1 with a blog app
  • data.xi3.io <--> docker container #2 with a data app
  • ....
  • xxx.xi3.io <--> docker container #n with a xxx app
TianxiLiu
  • 367
  • 1
  • 3
  • 8

1 Answers1

4

Related to port redirect to docker containers by hostname. In order to accomplish that you'll need to have each container expose it's port 80 (or whichever port an app server is listening on) to the host and then run some sort of a reverse proxy on the host machine to route the traffic properly.

Community
  • 1
  • 1
Evgeny Chernyavskiy
  • 2,584
  • 18
  • 13
  • This is what i have done. I have 3 docker containers hosting 3 different websites on ports like 5080, 5180, 5280 and i have a 4th container running varnish as a reverse proxy on port 80 to redirect the requests to the other containers. – TheStoneFox Mar 08 '14 at 21:05
  • Lovely setup. So does that mean your question has been answered? If so, please mark the answer as accepted. – Evgeny Chernyavskiy Mar 09 '14 at 14:23
  • I didn't ask the question, I was just confirming your answer for the original poster :) – TheStoneFox Mar 10 '14 at 12:29
  • Thanks a lot. By the way, I found using Dokku is another solution. – TianxiLiu Mar 12 '14 at 08:42
  • You should set a different name when you run your dockers. Then you can be able to run the same docker on single host. – user3774109 Mar 29 '17 at 15:01