From 8d3684506515b9b955b599f769a52247a638c6a7 Mon Sep 17 00:00:00 2001 From: Jakub Delicat Date: Mon, 22 Jul 2024 18:17:26 +0200 Subject: [PATCH] MYDISTRO Signed-off-by: Jakub Delicat --- Dockerfile.gazebo | 4 ++++ Dockerfile.hardware | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/Dockerfile.gazebo b/Dockerfile.gazebo index a891ca3..06991a5 100644 --- a/Dockerfile.gazebo +++ b/Dockerfile.gazebo @@ -1,5 +1,6 @@ ARG ROS_DISTRO=humble ARG PREFIX= +ARG MYDISTRO=ros ## =========================== Healthcheck builder =============================== @@ -7,6 +8,7 @@ FROM ros:${PREFIX}${ROS_DISTRO}-ros-base AS healthcheck_builder ARG ROS_DISTRO ARG PREFIX +ARG MYDISTRO SHELL ["/bin/bash", "-c"] @@ -35,6 +37,7 @@ RUN MYDISTRO=${PREFIX:-ros}; MYDISTRO=${MYDISTRO//-/} && \ FROM ros:${PREFIX}${ROS_DISTRO}-ros-base AS ros_builder ARG PREFIX +ARG MYDISTRO # select bash as default shell SHELL ["/bin/bash", "-c"] @@ -71,6 +74,7 @@ FROM ros:${PREFIX}${ROS_DISTRO}-ros-core ARG ROS_DISTRO ARG PREFIX +ARG MYDISTRO # select bash as default shell SHELL ["/bin/bash", "-c"] diff --git a/Dockerfile.hardware b/Dockerfile.hardware index ed0c06b..c89dae5 100644 --- a/Dockerfile.hardware +++ b/Dockerfile.hardware @@ -1,4 +1,5 @@ ARG ROS_DISTRO=humble +ARG MYDISTRO=ros ARG PREFIX= ## =========================== Healthcheck builder =============================== @@ -7,6 +8,7 @@ FROM ros:${PREFIX}${ROS_DISTRO}-ros-base AS healthcheck_builder ARG ROS_DISTRO ARG PREFIX +ARG MYDISTRO SHELL ["/bin/bash", "-c"] @@ -36,6 +38,7 @@ FROM ros:${PREFIX}${ROS_DISTRO}-ros-base AS ros_builder ARG ROS_DISTRO ARG PREFIX +ARG MYDISTRO SHELL ["/bin/bash", "-c"] @@ -57,7 +60,7 @@ RUN git clone --depth 1 -b jazzy-devel https://github.com/husarion/rosbot_ros.gi rosdep update --rosdistro $ROS_DISTRO && \ rosdep install --from-paths src --ignore-src -y && \ MYDISTRO=${PREFIX:-ros}; MYDISTRO=${MYDISTRO//-/} && \ - source /opt/$MYDISTRO/$MYDISTRO/$ROS_DISTRO/setup.bash && \ + source /opt/$MYDISTRO/$ROS_DISTRO/setup.bash && \ colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release && \ echo $(cat /ros2_ws/src/rosbot/package.xml | grep '' | sed -r 's/.*([0-9]+.[0-9]+.[0-9]+)<\/version>/\1/g') >> /version.txt && \ rm -rf build log @@ -67,6 +70,7 @@ FROM ros:${PREFIX}${ROS_DISTRO}-ros-core ARG ROS_DISTRO ARG PREFIX +ARG MYDISTRO SHELL ["/bin/bash", "-c"]