How Can I Assign Multiple Public IPs to Docker Containers?
Asked by
busY+ack
Hey folks! :)
I'm currently managing a Portainer cluster that hosts several containers. I've set up Nginx Proxy Manager to route these containers through port mapping, which lets them operate under a single public IP from my ISP.
However, I'm wondering if there's a method to give each container its own public IP, especially since I'm only provided with one IP. From what I've come across, using a reverse proxy might be a viable option, but I'm unsure about where I could source these 'new' or 'dynamic' external IPs from. Any advice or clarification would be truly appreciated! Thanks a bunch! :D
Answers
Are you specifically looking for IPs, or do you think a wildcard domain name could meet your needs?
Reply to this answer
You could consider leasing a block of extra public IPs from your ISP, especially if you have a business account; they might be more flexible about it.
Just a heads-up though, a reverse proxy could still be necessaryโconfirm with your ISP about any restrictions on hosting services. Exposing Docker services directly online can be risky unless theyโre secured appropriately.
catchment-area: I tried that already, but my ISP denied my request because Iโm not on a business plan. :/
Reply to this answer
It sounds like you might want to rethink your setup because needing multiple public IPs for containers on the same private network could indicate a design flaw. Whatโs the main reason you need different public IPs for these containers?
Reply to this answer
Add your answer
Answers are reviewed before publication.
busY+ack: Iโm definitely leaning towards needing IPs. I even considered routing some containers through VPNs, but Iโm skeptical if thatโs the best route. Some of the containers connect to the same service with different credentials, so I want to present them as "fully different clients" with distinct IPs.