Hello everybody! I have the following issue: I have two countainers, let’s call them C1 and C2, and they both expose the same port, let’s say 1234. I want to route both of them through a gluetun container. to do this, I added
network_mode: container:gluetun
at each container. But they both expose the same port, so there’s a conflict. Without routing them though gluetun I can just
ports:
- 1235:1234
but using network_mode this cannot be done. What can I do? The only thing that comes to my mind is to use two gluetun containers, but I’d rather use a single one
thanks in advance!
A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.
Rules:
Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.
No spam posting.
Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it’s not obvious why your post topic revolves around selfhosting, please include details to make it clear.
Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.
Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).
No trolling.
Resources:
Any issues on the community? Report it using the report flag.
Questions? DM the mods!
thanks for the reply! many services allows this by setting an environmental variable or through a config file, but sadly not all of them
I’ve yet to come across one that doesn’t allow it, that’s a pretty important feature for anything listening on a port to have.