forked from jbohren/rosdocked
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
58 lines (48 loc) · 1.48 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
FROM ros:indigo
# Arguments
ARG user
ARG uid
ARG home
ARG workspace
ARG shell
# Basic Utilities
RUN apt-get -y update && apt-get install -y zsh screen tree sudo ssh synaptic
# Latest X11 / mesa GL
RUN apt-get install -y\
xserver-xorg-dev-lts-wily\
libegl1-mesa-dev-lts-wily\
libgl1-mesa-dev-lts-wily\
libgbm-dev-lts-wily\
mesa-common-dev-lts-wily\
libgles2-mesa-lts-wily\
libwayland-egl1-mesa-lts-wily\
libopenvg1-mesa
# Dependencies required to build rviz
RUN apt-get install -y\
qt4-dev-tools\
libqt5core5a libqt5dbus5 libqt5gui5 libwayland-client0\
libwayland-server0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1\
libxcb-render-util0 libxcb-util0 libxcb-xkb1 libxkbcommon-x11-0\
libxkbcommon0
# The rest of ROS-desktop
RUN apt-get install -y ros-indigo-desktop-full ros-indigo-rqt-multiplot
# Additional development tools
RUN apt-get install -y x11-apps python-pip build-essential
RUN pip install catkin_tools
# Make SSH available
EXPOSE 22
# Mount the user's home directory
VOLUME "${home}"
# Clone user into docker image and set up X11 sharing
RUN \
echo "${user}:x:${uid}:${uid}:${user},,,:${home}:${shell}" >> /etc/passwd && \
echo "${user}:x:${uid}:" >> /etc/group && \
echo "${user} ALL=(ALL) NOPASSWD: ALL" > "/etc/sudoers.d/${user}" && \
chmod 0440 "/etc/sudoers.d/${user}"
# Switch to user
USER "${user}"
# This is required for sharing Xauthority
ENV QT_X11_NO_MITSHM=1
ENV CATKIN_TOPLEVEL_WS="${workspace}/devel"
# Switch to the workspace
WORKDIR ${workspace}