How to EXPOSE Port on running container

Your better bet will probably be to simply create new containers for each time a new service is needed. All of your containers would have a vnc service running internally on the VNC port, and then you would allocate new ports each time you started a new server.

docker run -d -p 5801:5800 --name vnc1 myvnc
docker run -d -p 5802:5800 --name vnc2 myvnc

Since you are asking about running multiple VNC sessions in the same container, do you need each connection to have access to some common resource? If you want your users to have access to common files, then you could put all of those files into a common volume.

/Jeff

1 Like