Ubuntu 18.04 desktop with "headless" VNC & RDP session
50K+
This repository contains a collection of Docker images with headless VNC & RDP environments. Based on consol/ubuntu-xfce-vnc
Each Docker image is installed with the following components:
5901)3389)6901)soff/ubuntu-xfce-vnc: Ubuntu with Xfce4 UI sessionUsage is similar for all provided images, e.g. for soff/ubuntu-xfce-vnc:
Print out help page:
docker run soff/ubuntu-xfce-vnc --help
Run command with mapping to local port 5901 (vnc protocol) and 6901 (vnc web access):
docker run -d -p 5901:5901 -p 6901:6901 soff/ubuntu-xfce-vnc
Run command with mapping to local port 3389 (rdp protocol):
docker run -d -p 3389:3389 soff/ubuntu-xfce-vnc
user with password password to login rdpRun command with mapping to local port 3389 (rdp protocol), with specific password:
docker run -d -p 3389:3389 -e USER_PASSWORD=1234 soff/ubuntu-xfce-vnc
Change the default user and group within a container to your own with adding --user $(id -u):$(id -g):
docker run -d -p 5901:5901 -p 6901:6901 --user $(id -u):$(id -g) soff/ubuntu-xfce-vnc
If you want to get into the container use interactive mode -it and bash
docker run -it -p 5901:5901 -p 6901:6901 soff/ubuntu-xfce-vnc bash
If the container is started like mentioned above, connect via one of these options:
localhost:5901, default password: vncpasswordhttp://localhost:6901/vnc.html, default password: vncpasswordhttp://localhost:6901/?password=vncpasswordSince version 1.1.0 all images run as non-root user per default, so if you want to extend the image and install software, you have to switch back to the root user:
## Custom Dockerfile
FROM soff/ubuntu-xfce-vnc
ENV REFRESHED_AT 2020-01-02
# Switch to root user to install additional software
USER 0
## Install a gedit
RUN yum install -y gedit \
&& yum clean all
## switch back to default user
USER 1000
Per default, since version 1.3.0 all container processes will be executed with user id 1000. You can change the user id as follows:
0)Add the --user flag to your docker run command:
docker run -it --user 0 -p 6911:6901 soff/ubuntu-xfce-vnc
Add the --user flag to your docker run command:
docker run -it -p 6911:6901 --user $(id -u):$(id -g) soff/ubuntu-xfce-vnc
The following VNC environment variables can be overwritten at the docker run phase to customize your desktop environment inside the container:
VNC_COL_DEPTH, default: 24VNC_RESOLUTION, default: 1280x1024VNC_PW, default: my-pwSimply overwrite the value of the environment variable VNC_PW. For example in
the docker run command:
docker run -it -p 5901:5901 -p 6901:6901 -e VNC_PW=my-pw soff/ubuntu-xfce-vnc
Simply overwrite the value of the environment variable VNC_RESOLUTION. For example in
the docker run command:
docker run -it -p 5901:5901 -p 6901:6901 -e VNC_RESOLUTION=800x600 soff/ubuntu-xfce-vnc
Since version 1.2.0 it's possible to prevent unwanted control via VNC. Therefore you can set the environment variable VNC_VIEW_ONLY=true. If set, the startup script will create a random password for the control connection and use the value of VNC_PW for view only connection over the VNC connection.
docker run -it -p 5901:5901 -p 6901:6901 -e VNC_VIEW_ONLY=true soff/ubuntu-xfce-vnc
If you open some graphic/work intensive websites in the Docker container (especially with high resolutions e.g. 1920x1080) it can happen that Chromium crashes without any specific reason. The problem there is the too small /dev/shm size in the container. Currently there is no other way, as define this size on startup via --shm-size option, see #53 - Solution:
docker run --shm-size=256m -it -p 6901:6901 -e VNC_RESOLUTION=1920x1080 soff/ubuntu-xfce-vnc chromium-browser http://map.norsecorp.com/
Thx @raghavkarol for the hint!
At this point we want to thank all contributors, which helped to move this great project by submitting code, writing documentation, or adapting other tools to play well together with the docker headless container.
The current changelog is provided here: changelog.md
For questions, professional support or maybe some hints, feel free to contact us via [email protected] or open an issue.
The guys behind:
ConSol Software GmbH
Franziskanerstr. 38, D-81669 Munich
Tel. +49-89-45841-100, Fax +49-89-45841-111
Homepage: http://www.consol.de E-Mail: [email protected]
Content type
Image
Digest
Size
414.6 MB
Last updated
over 6 years ago
docker pull soff/ubuntu-xfce-vnc