Skip to content
This repository was archived by the owner on Aug 5, 2025. It is now read-only.

Commit 2d17fd4

Browse files
Update Dockerfile.hardware
1 parent 5111ef2 commit 2d17fd4

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

Dockerfile.hardware

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@ COPY healthcheck.cpp src/healthcheck_pkg/src/
2828

2929
RUN MYDISTRO=${PREFIX:-ros}; MYDISTRO=${MYDISTRO//-/} && \
3030
source /opt/$MYDISTRO/$ROS_DISTRO/setup.bash && \
31-
colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release && \
32-
rm -rf build log src
31+
colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release
3332

3433
## =========================== ROS builder ===============================
3534
FROM husarnet/ros:${PREFIX}${ROS_DISTRO}-ros-base AS ros_builder
@@ -58,9 +57,8 @@ RUN git clone --depth 1 -b humble https://github.com/husarion/rosbot_ros.git src
5857
rosdep install --from-paths src --ignore-src -y && \
5958
MYDISTRO=${PREFIX:-ros}; MYDISTRO=${MYDISTRO//-/} && \
6059
source /opt/$MYDISTRO/$ROS_DISTRO/setup.bash && \
61-
colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release && \
62-
echo $(cat /ros2_ws/src/rosbot/package.xml | grep '<version>' | sed -r 's/.*<version>([0-9]+.[0-9]+.[0-9]+)<\/version>/\1/g') >> /version.txt && \
63-
rm -rf build log
60+
colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release && \
61+
echo $(cat /ros2_ws/src/rosbot/package.xml | grep '<version>' | sed -r 's/.*<version>([0-9]+.[0-9]+.[0-9]+)<\/version>/\1/g') >> /version.txt
6462

6563
## =========================== Final Stage ===============================
6664
FROM husarnet/ros:${PREFIX}${ROS_DISTRO}-ros-core
@@ -97,7 +95,6 @@ RUN apt-get update && apt-get install -y \
9795
python3-rosdep \
9896
python3-pip && \
9997
apt-get clean && \
100-
rm -rf src && \
10198
rm -rf /var/lib/apt/lists/*
10299

103100
COPY healthcheck.sh /

0 commit comments

Comments
 (0)