(If not available) Install Docker Engine
curl -sSL https://get.docker.com/ | sh
Run command with mapping to local port 5901 (vnc protocol) and 6901 (vnc web access):
docker run -d -p 5901:5901 -p 6901:6901 wn1980/ros-vnc:cpu
If you want to get into the container use interactive mode -it and bash
docker run -it -p 5901:5901 -p 6901:6901 wn1980/ros-vnc:cpu bash
If you want to connect to tensorboard, run command with mapping to local port 6006:
docker run -it -p 5901:5901 -p 6901:6901 -p 6006:6006 wn1980/ros-vnc:cpu
Build an image from scratch:
docker build -t wn1980/ros-vnc:cpu -f Dockerfile.cpu .
Note For GPU, please change xxx:cpu to xxx:gpu and replace the command docker with nvidia-docker.
If the container runs up, you can connect to the container throught the following
localhost:5901, default password: vncpasswordhttp://localhost:6901/vnc.html, default password: vncpasswordhttp://localhost:6901/?password=vncpasswordhttp://localhost:60060)Add the --user flag to your docker run command:
docker run -it --user root -p 5901:5901 wn1980/ros-vnc:cpu
Add the --user flag to your docker run command (Note: uid and gui of host system may not able to map with container, which is 1000:1000. If that is the case, check with 3):
docker run -it -p 5901:5901 --user $(id -u):$(id -g) wn1980/ros-vnc:cpu
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: 1920x1080VNC_PW, default: vncpasswordUSER, default: rosPASSWD, default: rosSimply 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=vncpassword wn1980/ros-vnc:cpu
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 wn1980/ros-vnc:cpu
You should run with following environment variable in order to mapping host user/group with container, and retrieve R/W permission of mounting directory in container (Note: after running this command, the user account in container will be same as host account):
docker run -it -p 5901:5901 \
--user $(id -u):$(id -g) \
--volume /etc/passwd:/etc/passwd \
--volume /etc/group:/etc/group \
--volume /etc/shadow:/etc/shadow \
--volume /home/ros/Desktop:/home/ros/Desktop:rw \
wn1980/ros-vnc:cpu
Run command with mapping to local port 8888 (jupyter protocol) and 8888 (host web access):
docker run -d -p 8888:8888 wn1980/ros-vnc:cpu
Check your local IP within container using $ifconfig, then you can start up jupyter notebook in container with following command:
jupyter notebook --ip={YOUR CONTAINER IP} --port=8888 --allow-root
After start up the jupyter kernel, you can access the notebook from host browser through HTTP service.
http://localhost:8888/
Content type
Image
Digest
Size
2.9 GB
Last updated
about 7 years ago
docker pull waipotn/ros-novnc