I have multiple docker containers on a single machine. On each container is running a process and a web server that provides an API for the process.
My question is,
Only a single process is allowed to be bound to a port at a time. So running multiple containers means each will be exposed on a different port number. Docker can do this automatically for you by using the "-P" attribute.
sudo docker run -P -t -i /
You can use the "docker port" and "docker inspect" commands to see the actual port number allocated to each container.