Skip to content

Commit 50bf305

Browse files
authored
Allow usage of different ROS distributions in Dockerfile (#313)
* Allow usage of different ROS distributions in Dockerfile * iron docker is working too
1 parent 8d5d57e commit 50bf305

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Dockerfile

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
FROM ros:humble as base
1+
ARG ROS_DISTRO=humble
2+
FROM ros:$ROS_DISTRO as base
23
ARG DEBIAN_FRONTEND=noninteractive
34

45
# Install dependencies

docs/building.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ Build the Docker image with
5656

5757
```shell
5858
# Make sure to run this in the workspace directory
59-
docker build -t ros2_rust_dev - < src/ros2_rust/Dockerfile
59+
# ROS_DISTRO can be humble|iron|rolling
60+
docker build -f src/ros2_rust/Dockerfile --build-arg "ROS_DISTRO=humble" -t ros2_rust_dev
6061
```
6162

6263
and then run it with

0 commit comments

Comments
 (0)