Merge branch 'master' of ssh://bitbucket.xitaso.com/ri/docker_ros_x11

This commit is contained in:
Bastian Hofmann 2022-11-14 15:53:34 +01:00
commit 2ddbf88d8b
2 changed files with 17 additions and 3 deletions

View File

@ -3,8 +3,7 @@ FROM osrf/ros:${ROS}-desktop
#SSH (First to hopefully keep keys, even on modification.)
RUN apt-get update && apt-get install -y openssh-server && rm -rf /var/lib/apt/lists/*
RUN mkdir /run/sshd
RUN ssh-keygen -A
#OpenGL
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y xserver-xorg-video-all libgl1-mesa-glx libgl1-mesa-dri libglvnd0 libgl1 libglx0 libegl1 libxext6 libx11-6 && rm -rf /var/lib/apt/lists/*
#Vulkan
@ -14,6 +13,8 @@ RUN apt-get update && apt-get install -y git ninja-build git bash-completion cla
#Rosdeps
RUN apt-get update && apt-get install -y git ros-galactic-ament-cmake ros-galactic-moveit ros-galactic-behaviortree-cpp-v3 ros-galactic-ros-ign-gazebo && rm -rf /var/lib/apt/lists/*
RUN mkdir /run/sshd
ARG G_ID=1000
ARG U_ID=1000

View File

@ -1,6 +1,17 @@
#!/bin/bash
pushd $(dirname "$0")
if [ ! -d "home" ]; then
mkdir $(dirname "$0")/home
fi
if [ ! -d "home/.ssh" ]; then
mkdir home/.ssh
fi
ident=$(<~/.ssh/id_rsa.pub)
grep -sqF -- "$ident" "home/.ssh/authorized_keys" || echo "$ident" >> "home/.ssh/authorized_keys"
sudo docker-compose down
@ -33,3 +44,5 @@ for host in ${hosts[@]}; do
echo " - $host"
xhost "-local:$host"
done
popd