-
Notifications
You must be signed in to change notification settings - Fork 718
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Port mapping and concurrent containers #51
Comments
You have "-p 5901:5901" in both containers. |
Hello @plaihonen , |
@FreeSpace911, See the docker run documentation ( the -p [ ] format ) |
Like already mentioned you have correct your docker port mapping. That's the normal behavior like other docker images would also do. You also can use the
If you wan to have multiple instances with an specific port, just increase your first port number, e.g.:
|
Hello,
I have created one container with the following command:
[username@localhost ~]# docker run -d -p 5901:5901 -e VNC_RESOLUTION=1920x1080 -p 6901:6901 consol/ubuntu-xfce-vnc c6e7194d9ed19f2f291d6cd1925a4352965c37c6692adf2c502e6cf47226a91c
And then when I tired to create another container on the same host with different port number I got the following error:
[username@localhost ~]# docker run -d -p 5901:5901 -e VNC_RESOLUTION=1920x1080 -p 6902:6902 consol/ubuntu-xfce-vnc bb77aa923ed98642601049703bfdc8712cc34b2467aa5f235a61c24c41ea3341 /usr/bin/docker-current: Error response from daemon: driver failed programming external connectivity on endpoint pedantic_pasteur (1593ca8771edb808e917ee5e60a2a2d07c0e63a8fb8ed38a4d42e50cbf6145a6): Bind for 0.0.0.0:5901 failed: port is already allocated.
So, what is the right way in order to mange this scenario?
Thanks!
The text was updated successfully, but these errors were encountered: