-
Notifications
You must be signed in to change notification settings - Fork 4
/
Dockerfile-rosssh
41 lines (31 loc) · 1.45 KB
/
Dockerfile-rosssh
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
# === neildhar/rosssh === #
FROM osrf/ros:kinetic-desktop-full-xenial
#add ROS sources
RUN apt update && apt install -y openssh-server x11-apps mesa-utils vim llvm-dev sudo autoconf
RUN mkdir /var/run/sshd
RUN echo 'root:buttercups' | chpasswd
RUN sed -i 's/PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config
RUN grep "^X11UseLocalhost" /etc/ssh/sshd_config || echo "X11UseLocalhost no" >> /etc/ssh/sshd_config
# SSH login fix. Otherwise user is kicked off after login
RUN sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd
#Rebuild MESA with llvmpipe (from https://turbovnc.org/Documentation/Mesa)
RUN wget ftp://ftp.freedesktop.org/pub/mesa/mesa-18.3.1.tar.gz;\
tar -zxvf mesa-18.3.1.tar.gz;\
rm mesa-18.3.1.tar.gz;\
cd mesa-18.3.1;\
autoreconf -fiv;\
./configure --enable-glx=gallium-xlib --disable-dri --disable-egl --disable-gbm --with-gallium-drivers=swrast --prefix=$HOME/mesa;\
make install
#set up locales
RUN apt install -y locales screen
RUN locale-gen en_GB.UTF-8 && locale-gen en_US.UTF-8
#INSTALL ADDITIONAL ROS PACKAGES BELOW HERE
#clear apt caches to reduce image size
RUN rm -rf /var/lib/apt/lists/*
#configure system to use new mesa
RUN cd ~ && echo "export LD_LIBRARY_PATH=/root/mesa/lib" > opengl.sh
ENV NOTVISIBLE "in users profile"
RUN echo "export VISIBLE=now" >> /etc/profile
# Start and expose the SSH service
EXPOSE 22
ENTRYPOINT service ssh restart