From c674423d27ff49f5a1cac6cacf5ecda91252fc45 Mon Sep 17 00:00:00 2001 From: Uwe Arzt Date: Sat, 27 May 2023 14:59:18 +0200 Subject: [PATCH 1/2] Allow usage of different ROS distributions in Dockerfile --- Dockerfile | 3 ++- docs/building.md | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index e3929e089..b0a282995 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,5 @@ -FROM ros:humble as base +ARG ROS_DISTRO=humble +FROM ros:$ROS_DISTRO as base ARG DEBIAN_FRONTEND=noninteractive # Install dependencies diff --git a/docs/building.md b/docs/building.md index c57400b1c..fac84da04 100644 --- a/docs/building.md +++ b/docs/building.md @@ -56,7 +56,8 @@ Build the Docker image with ```shell # Make sure to run this in the workspace directory -docker build -t ros2_rust_dev - < src/ros2_rust/Dockerfile +# ROS_DISTRO can be humble|rolling +docker build -f src/ros2_rust/Dockerfile --build-arg "ROS_DISTRO=humble" -t ros2_rust_dev ``` and then run it with From 2af43aa235616c3baf70f462aaef565b57e36e88 Mon Sep 17 00:00:00 2001 From: Uwe Arzt Date: Sat, 3 Jun 2023 18:56:14 +0200 Subject: [PATCH 2/2] iron docker is working too --- docs/building.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/building.md b/docs/building.md index fac84da04..8bcfe9b81 100644 --- a/docs/building.md +++ b/docs/building.md @@ -56,7 +56,7 @@ Build the Docker image with ```shell # Make sure to run this in the workspace directory -# ROS_DISTRO can be humble|rolling +# ROS_DISTRO can be humble|iron|rolling docker build -f src/ros2_rust/Dockerfile --build-arg "ROS_DISTRO=humble" -t ros2_rust_dev ```