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..8bcfe9b81 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|iron|rolling +docker build -f src/ros2_rust/Dockerfile --build-arg "ROS_DISTRO=humble" -t ros2_rust_dev ``` and then run it with