Docker Community Forums

Share and learn in the Docker community.

Multiple Containers on One External IP Address

Sorry if this has been asked before. However, I’m Stuck on this networking issue I’m having.
I’ve been using portainer as I’m a New Docker user, and all I’m trying to do is set up 3 Containers to have the Same External IP Address.

I’ve googled everything I can think of, and maybe I’m not googling the right thing - But I’ve spent hours trying to figure this out.

What I’m trying to accomplish:

  • Running 4 Containers on 234.141.332.68 (all using different ports)
  • Only have the 3 Containers on the .68 respond to the .68 IP address (Eg: Don’t want to go to 234.141.332.66:8080 and get to the same application)

How would I go about doing this? I’ve set up a Maclan, but then I’m unable to use the IP address more than once as it’s already being used.

Thanks in Advanced!

Containers usually contain an application and its dependencies, such as libraries and frameworks. Multiple containers can run on a single host. Containers decouple applications from operating systems so that you can have a clean and minimal Linux operating system and run everything else in some form of containers.