Public | Automated Build

Last pushed: 6 days ago
Short Description
ROS lunar-desktop-full image with runtime user creation and X11 forwarding support
Full Description

Dockerfile for ROS Lunar desktop-full, built on top of the
osrf/ros:lunar-desktop-full image.

Features:

  • X11 authentication for GUIs
  • Image size: 3.2GB
  • User created during runtime

Build the image

docker build -t diegoferigo/ros .

User configuration

Several reasons could be found for having a non-root user within the container
that matches the GID and UID of your host user.

This docker image allows the creation of a runtime user, whose default UID and
GID is 1000. To override these values and to start the container, execute:

USER_UID=1000
USER_GID=1000
USERNAME=foo

docker run -i -t --rm \
    -e USER_UID=$USER_UID \
    -e USER_GID=$USER_GID \
    -e USERNAME=$USERNAME \
    --name ros \
    diegoferigo/ros \
    bash

Then, create as many ttys as needed with

docker exec -it ros bash

The image does not contain sudo and the root password is not set. When the active
user is not root, to execute commands that require admin privileges you should
open a new tty or use exit on the current shell getting back to the root user.

X11 authentication

As an example, rqt is forwarded from within the container to the host's Xserver:

XSOCK=/tmp/.X11-unix
XAUTH=/tmp/.docker.xauth

touch $XAUTH
xauth nlist $DISPLAY | sed -e 's/^..../ffff/' | xauth -f $XAUTH nmerge -

docker run -i -t --rm \
    -v $XSOCK:$XSOCK:rw \
    -v $XAUTH:$XAUTH:rw \
    -e XAUTHORITY=${XAUTH} \
    -e DISPLAY \
    --name ros \
    diegoferigo/ros \
    rqt

If you need HW acceleration (only for Intel graphic cards), add also this device
flag --device=/dev/dri.

Resources

TODO

Docker Pull Command
Owner
diegoferigo
Source Repository

Comments (0)