Changed some starting logic, should result in better ssh access.
This commit is contained in:
parent
44f9d1dd2a
commit
245b5325e6
@ -3,17 +3,18 @@ FROM osrf/ros:${ROS}-desktop
|
|||||||
|
|
||||||
#SSH (First to hopefully keep keys, even on modification.)
|
#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 apt-get update && apt-get install -y openssh-server && rm -rf /var/lib/apt/lists/*
|
||||||
RUN mkdir /run/sshd
|
|
||||||
RUN ssh-keygen -A
|
|
||||||
#OpenGL
|
#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/*
|
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
|
#Vulkan
|
||||||
RUN apt-get update && apt-get install -y libvulkan1 mesa-vulkan-drivers vulkan-utils mesa-utils && rm -rf /var/lib/apt/lists/*
|
RUN apt-get update && apt-get install -y libvulkan1 mesa-vulkan-drivers vulkan-utils mesa-utils && rm -rf /var/lib/apt/lists/*
|
||||||
#Utils
|
#Utils
|
||||||
RUN apt-get update && apt-get install -y git ninja-build git bash-completion && rm -rf /var/lib/apt/lists/*
|
RUN apt-get update && apt-get install -y git ninja-build git bash-completion clangd-12 && rm -rf /var/lib/apt/lists/*
|
||||||
#Rosdeps
|
#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 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 G_ID=1000
|
||||||
ARG U_ID=1000
|
ARG U_ID=1000
|
||||||
|
|
||||||
|
|||||||
13
start.sh
13
start.sh
@ -1,6 +1,17 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
pushd $(dirname "$0")
|
||||||
|
|
||||||
|
if [ ! -d "home" ]; then
|
||||||
mkdir $(dirname "$0")/home
|
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
|
sudo docker-compose down
|
||||||
|
|
||||||
@ -33,3 +44,5 @@ for host in ${hosts[@]}; do
|
|||||||
echo " - $host"
|
echo " - $host"
|
||||||
xhost "-local:$host"
|
xhost "-local:$host"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
popd
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user