I am looking at approaches to allow multiple containers to be connect on same port using UDP (and TCP if needed) where messages are sent to docker container and Docker containers will reply back to another PC (one that sent the messages/Client PC).
I looked into the following link,
How to Expose Multiple Containers On the Same Port
And found the a step which is
Multiple Containers / Same Port using DNAT is that approach best for my situation or is there a better approach?
I tried IP forwarding on other cases not like docker but my only concern is if I mention different ports will the messages still be sent to that port? Or is there a better approach?
For example, say Pc is using 7000 as port to send messages to the docker containers and DNAT was set to 7001 and 7002 to prevent issues with being assigned to same port. Will the messages still be sent and received by the PC (you can say client PC) to containers?
k.mo is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.