Skip to content

Variables

Ed Fullman edited this page Sep 15, 2020 · 2 revisions

Override Container Variables

The container has a number of ENV variables that can be overriden in the docker run:

  • VNC_PORT=5901
  • NO_VNC_PORT=6901
  • VNCPASSWD=vncpassword
  • VNC_COL_DEPTH=24
  • VNC_RESOLUTION=1920x1080
  • VNC_PW=$VNCPASSWD
  • user=ros
  • passwd=ros
  • uid=1000
  • gid=1000
  • USER=$user
  • PASSWD=$passwd
  • UID=$uid
  • GID=$gid

Override the VNC password

Simply 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 grendel61/ros-visualization:[Docker_tag] 

Override the VNC resolution

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 grendel61/ros-visualization:[Docker_tag] 

Using root (user id 0)

Add the --user flag to your docker run command:

    docker run -it --user root -p 5901:5901 grendel61/ros-visualization:[Docker_tag] 

Using user and group id of host system

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) grendel61/ros-visualization:[Docker_tag] 

Clone this wiki locally