-
Notifications
You must be signed in to change notification settings - Fork 38
Expand file tree
/
Copy pathDockerfile
More file actions
49 lines (36 loc) · 1.21 KB
/
Dockerfile
File metadata and controls
49 lines (36 loc) · 1.21 KB
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
# ROS base
FROM osrf/ros:humble-desktop-full
# Choose bash shell
SHELL ["/bin/bash", "-c"]
# Environment Variables
ENV HOME=/root
# Update apt
RUN apt update
# Install git and SSH client
RUN apt install -y git openssh-client
# Add public github and bitbucket keys
RUN mkdir -p -m 0600 $HOME/.ssh
RUN ssh-keyscan github.com >> $HOME/.ssh/known_hosts
RUN ssh-keyscan bitbucket.org >> $HOME/.ssh/known_hosts
# Install system dependencies
RUN apt update && apt install -y \
libeigen3-dev \
libomp-dev \
libpcl-dev \
ros-humble-pcl*
# Install mcap support
RUN apt install -y ros-humble-rosbag2-storage-mcap
# Install gdb support
RUN apt install -y gdb gdbserver
# Add colcon bash completion
RUN echo "source /usr/share/colcon_argcomplete/hook/colcon-argcomplete.bash" >> $HOME/.bashrc
# Create ROS2 Workspace
RUN mkdir -p $HOME/ros2_ws/src
# Build workspace packages, mounting only for the build
WORKDIR $HOME/ros2_ws
RUN --mount=type=bind,destination=$HOME/ros2_ws/src/RESPLE source /opt/ros/humble/setup.bash && \
colcon build \
--cmake-args -DCMAKE_BUILD_TYPE=Release \
--packages-up-to resple
# Add workspace to default source
RUN echo "source $HOME/ros2_ws/install/setup.bash" >> $HOME/.bashrc