/docker-secure-vncserver

Run a docker container with turboVNC and websockify in secure mode.

GNU General Public License v2.0GPL-2.0

Secure VNC Server Docker

Run a docker container with turboVNC and websockify in secure mode.

  1. Create the certificate self.pem
openssl req -new -x509 -days 365 -nodes -out self.pem -keyout self.pem
  1. Build the image
docker build -t vncsecure .
  1. Run the container in background.
docker run -p 5900:5900 --name vncsecurecontainer -d vncsecure
  1. Get the One Time Password (OTP).
docker exec vncsecurecontainer /opt/TurboVNC/bin/vncpasswd -o -display :1
  1. Access in a browser the https://localhost:5900 and accept the self-signed certificate. Note for boot2docker users: change localhost for the IP of your docker host. Run the command boot2docker ip to get it.

  2. Access http://novnc.com to connect to the machine.

  3. Check the Encrypt option in the settings.

noVNC settings

  1. Inform the connection settings:
Setting Description Default of this example
HOST docker ip localhost (maybe it is a different one if you are using boot2docker)
PORT vnc port 5900
PASSWORD OTP created at step 4

noVNC connection

  1. Open a program in the display (firefox for example).
docker exec vncsecurecontainer firefox