Skip to content

feat: add arg in compose file to select ros image - #264

Open
JMoore5353 wants to merge 3 commits into
mainfrom
jacob/add-rpi-docker
Open

feat: add arg in compose file to select ros image#264
JMoore5353 wants to merge 3 commits into
mainfrom
jacob/add-rpi-docker

Conversation

@JMoore5353

Copy link
Copy Markdown
Contributor

To use this Dockerfile on arm-based machines (e.g. RPi or Jetson Orin), we need to use a different base image. This PR adds a Dockerfile arg to select the ROS base image, and adds a comment in the compose.yaml file that users can uncomment when running on arm device.

By default, the Dockerfile will pull the amd64-based image.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the Docker-based development environment to support selecting an alternate ROS base image (e.g., for ARM64 hosts) by introducing a configurable ROS_IMAGE build arg and documenting how to override it in compose.yaml.

Changes:

  • Add a ROS_IMAGE Docker build argument and switch the FROM line to use it.
  • Add a commented example in docker/compose.yaml showing how to override the base image for ARM devices.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
docker/Dockerfile Adds ROS_IMAGE build arg and uses it for the base image selection.
docker/compose.yaml Adds a commented ARM override example for ROS_IMAGE in build args.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docker/Dockerfile Outdated
Comment thread docker/compose.yaml Outdated
JMoore5353 and others added 2 commits July 2, 2026 13:09
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@JMoore5353

Copy link
Copy Markdown
Contributor Author

I verified that removing the "ENV ..." line works as expected. The background from this comes from this link.

By default, ARGs declared before the FROM command are not in scope after the FROM command. So the line "ENV ROS_DISTRO=${ROS_DISTRO}" was only working because ROS_DISTRO was already set by the base image. It was not getting pulled in from the "ARG ROS_DISTRO" line.

That line was redundant, so I removed it. I verified that it still works by building it and making sure the expansions still resolved by checking to see if the plotjuggler apt package was installed.

@JMoore5353

Copy link
Copy Markdown
Contributor Author

@iandareid

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