ROS Melodic on Ubuntu 18.04 for use with VNC (GUIs)
1.1K
This repository contains a Docker image for ROS Melodic (desktop-full version) that allows to run ROS as a Docker container and access GUIs (rviz, gazebo, ...) via VNC. This repo is forked from two other repos:
More information may be found there.
Each Docker image is installed with the following components:
5901)6901)tdcode/docker-ros-vnc:latest: Ubuntu 18.04 with ROS Melodic, Tensorflow 2.0, and VNC support
tdcode/docker-ros-vnc:nvidia: Ubuntu 18.04 with GPUs suppoer (via nvidia/cuda:10.1-cudnn7-devel-ubuntu18.04), ROS Melodic, Tensorflow 2.0, and VNC support

You will be running the container with following user:
user: ros
(sudo) password: ros
Run command with mapping to local port 5901 (vnc protocol) and 6901 (vnc web access):
docker run -d -p 5901:5901 -p 6901:6901 -e VNC_RESOLUTION=1920x1080 --rm tdcode/docker-ros-vnc:latest
Note that -e VNC_RESOLUTION=1920x1080 may be adjusted to select an approriate screen resolution.
If you want to get into the container use interactive mode -it and bash
docker run -it --rm -p 5901:5901 -p 6901:6901 tdcode/docker-ros-vnc:latest bash
This should be basically the same, just replace docker by nvidia-docker (check out https://github.com/NVIDIA/nvidia-docker for latest information on how to enable run nvidia docker containers):
With mapping to local port 5901 (vnc protocol) and 6901 (vnc web access):
nvidia-docker run -d -p 5901:5901 -p 6901:6901 -e VNC_RESOLUTION=1920x1080 --rm tdcode/docker-ros-vnc:nvidia
Using interactive mode -it and bash
nvidiadocker run -it --rm -p 5901:5901 -p 6901:6901 tdcode/docker-ros-vnc:nvidia bash
If you don't want to use the Dockerhub versions of these images, you may build the images yourself via
docker build -t docker-ros-nvidia-vnc -f Dockerfile.ubuntu.nvidia.xfce.vnc .
or
docker build -t docker-ros-vnc -f Dockerfile.ubuntu.xfce.vnc .
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=vncpasswordThe 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 consol/centos-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 consol/centos-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 tdcode/docker-ros-vnc:latest
Content type
Image
Digest
Size
2.3 GB
Last updated
over 6 years ago
docker pull tdcode/docker-ros-vnc