GithubHelp home page GithubHelp logo

Comments (4)

plaihonen avatar plaihonen commented on May 14, 2024

You have "-p 5901:5901" in both containers.

from docker-headless-vnc-container.

FreeSpace911 avatar FreeSpace911 commented on May 14, 2024

Hello @plaihonen ,
Changing the 5901 port number will create the container but without connectivity! This is the local VNC port number.

from docker-headless-vnc-container.

plaihonen avatar plaihonen commented on May 14, 2024

@FreeSpace911,
You only change the port for the host 0.0.0.0, not for the container.
Per your error message, Bind for 0.0.0.0:5901 failed: port is already allocated., you can not bind the 5901 twice.

See the docker run documentation ( the -p [ ] format )
https://docs.docker.com/engine/reference/run/#expose-incoming-ports

from docker-headless-vnc-container.

toschneck avatar toschneck commented on May 14, 2024

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 -P what choose random port:

docker run --help
...
     -p, --publish list                   Publish a container's port(s) to the host
     -P, --publish-all                    Publish all exposed ports to random ports`

If you wan to have multiple instances with an specific port, just increase your first port number, e.g.:

docker run -d -p 5901:5901 -e VNC_RESOLUTION=1920x1080 -p 6901:6901 -d consol/ubuntu-xfce-vnc
docker run -d -p 5902:5901 -e VNC_RESOLUTION=1920x1080 -p 6902:6901 -d consol/ubuntu-xfce-vnc

from docker-headless-vnc-container.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.