How Can I Assign Multiple Public IPs to Docker Containers?

June 3, 2025 3 answers
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

half.past.four
Are you specifically looking for IPs, or do you think a wildcard domain name could meet your needs?

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.

Reply to this answer
no more spreadsheets
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
!~answer on page
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.

Related Discussions