From a794a31aebbef29d38be754c895448c6dc0cda82 Mon Sep 17 00:00:00 2001 From: Jean-Pierre Busch Date: Mon, 22 Jan 2024 14:01:32 +0100 Subject: [PATCH] fix rmw installation for non-ros base images --- docker/Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index fb70eeb..bcf517a 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -208,7 +208,8 @@ RUN source /opt/ros/$ROS_DISTRO/setup.bash && \ # install desired ROS 2 middleware ARG RMW_IMPLEMENTATION ENV RMW_IMPLEMENTATION=${RMW_IMPLEMENTATION} -RUN if [[ "$ROS_VERSION" == "2" ]]; then \ +RUN source /opt/ros/$ROS_DISTRO/setup.bash && \ + if [[ "$ROS_VERSION" == "2" ]]; then \ apt-get update && \ RMW_PACKAGE=ros-$ROS_DISTRO-$(echo $RMW_IMPLEMENTATION | tr '_' '-') && \ apt-get install -y $RMW_PACKAGE && \