Skip to content

Add rosidl_rust to a sourced overlay in the docker image - #494

Merged
esteve merged 5 commits into
ros2-rust:mainfrom
maspe36:maspe36/flexible_dockerfile_for_distros
Aug 15, 2025
Merged

Add rosidl_rust to a sourced overlay in the docker image#494
esteve merged 5 commits into
ros2-rust:mainfrom
maspe36:maspe36/flexible_dockerfile_for_distros

Conversation

@maspe36

@maspe36 maspe36 commented Jun 29, 2025

Copy link
Copy Markdown
Collaborator

Add rosidl_rust in an overlay sourced in the dev container via an entrypoint.

Move any logic that will change between distros into shell scripts for more flexibility.


Rather than for ros2_rust development, I find this image most useful for downstream development of packages. This way I can just add rclrs as a dep and everything "just works". There is probably a discussion to be had for moving this out of the repo as its more rclrs adjacent at this point.

Tested locally for Humble, Jazzy, Kilted, and Rolling with our ros2_rust workspace (described in the README) with a COLCON_IGNORE in the src/ros2-rust/rosidl_rust/rosidl_generator_rs package.

cd rust_ws/
docker build --build-arg ROS_DISTRO=jazzy -f src/ros2_rust/Dockerfile -t ros2_rust_dev:jazzy . 
docker run -it -v ./:/workspace ros2_rust_dev:jazzy

In the container

rm -rf build/ log/ install/
colcon build

@esteve esteve left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@maspe36 LGTM, thanks!

@esteve
esteve merged commit 5ea1c95 into ros2-rust:main Aug 15, 2025
12 of 17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants