-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
executable file
·35 lines (30 loc) · 1.23 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
ARG ROS_DISTRO=humble
FROM husarnet/ros:${ROS_DISTRO}-ros-core
# select bash as default shell
SHELL ["/bin/bash", "-c"]
WORKDIR /ros2_ws
# install everything needed
RUN apt-get update && apt-get install -y \
python3-pip \
python3-colcon-common-extensions \
python3-rosdep \
python3-vcstool \
git && \
apt-get upgrade -y && \
source "/opt/ros/$ROS_DISTRO/setup.bash" && \
git clone -b ros2 --recurse-submodules https://github.com/ouster-lidar/ouster-ros.git /ros2_ws/src/ouster-ros && \
rm -rf /etc/ros/rosdep/sources.list.d/20-default.list && \
rosdep init && \
rosdep update --rosdistro $ROS_DISTRO && \
rosdep install -i --from-path /ros2_ws/src --rosdistro $ROS_DISTRO -y && \
colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release && \
export SUDO_FORCE_REMOVE=yes && \
apt-get remove -y \
python3-colcon-common-extensions \
python3-rosdep \
python3-vcstool \
git && \
apt-get autoremove -y && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
RUN echo $(cat /ros2_ws/src/ouster-ros/ouster-ros/package.xml | grep '<version>' | sed -r 's/.*<version>([0-9]+.[0-9]+.[0-9]+)<\/version>/\1/g') > /version.txt