Update Dockerfiles to support dynamic package installation and build type configuration

This commit is contained in:
Даниил Грабарь
2026-05-19 01:51:51 +03:00
parent 06c50616b4
commit 24bc5f3aba
3 changed files with 31 additions and 6 deletions
+11 -2
View File
@@ -1,14 +1,21 @@
FROM evilfisru/ros:jazzy-base-noble
ARG BUILD_TYPE=release
ENV RMW_IMPLEMENTATION=rmw_cyclonedds_cpp
RUN apt-get update && apt-get install -y --no-install-recommends \
ros-jazzy-rmw-cyclonedds-cpp \
ros-${ROS_DISTRO}-ros2-control \
ros-${ROS_DISTRO}-ros2-controllers \
ros-${ROS_DISTRO}-rmw-cyclonedds-cpp \
ros-${ROS_DISTRO}-moveit \
ros-${ROS_DISTRO}-moveit-py \
ros-${ROS_DISTRO}-ament-cmake-clang-format \
ros-${ROS_DISTRO}-rosbag2-storage-mcap \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /ros2_ws
COPY src/ src/
COPY src/iiwa_* src/
RUN apt-get update && \
rosdep install --from-paths src -i -r -y && \
@@ -17,6 +24,8 @@ RUN apt-get update && \
RUN . /opt/ros/$ROS_DISTRO/setup.sh && \
colcon build --mixin release
RUN if [ "$BUILD_TYPE" = "release" ]; then rm -rf src/ build/ log/; fi
RUN echo ". /ros2_ws/install/setup.bash" >> /root/.bashrc
CMD ["bash"]