On mobile so you’ll have to forgive format jank.
It depends how each image handles ports if C1 has the ports set up as 1234:100 and C2 has the ports set up as 1234:500 then:
service:
gluetun:
ports:
- 1234:100 #c1 - 1235:500 #c2
[…]
Will solve the conflict
Sometimes an image will allow you to edit it’s internal ports with an environment so
service:
gluetun:
ports:
- 1234:1000 #c1 -1235:1234 #c2
c1:
environent:
- UI_PORT=1000
[…]
When both contsiners use the same second number, C1: 1234:80, C21235:80, and neither documents suggest how to change that port, I personally haven’t found a way to resolve that conflict.
It’s not mine. Feel free