Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a production-oriented container build + publish path for ros2_medkit by introducing a multi-stage Docker image (parameterized by ROS_DISTRO) and a GitHub Actions workflow that publishes per-distro images to GHCR on main.
Changes:
- Add a top-level multi-stage
Dockerfilethat builds the full workspace and ships a slim runtime image with an entrypoint to startgateway_node. - Add Docker runtime defaults (
docker/gateway_docker_params.yaml) and an entrypoint script (docker/entrypoint.sh) for container startup/config override. - Add a
docker-publish.ymlworkflow to build and pushjazzy/humble/rollingimages to GHCR, plus a.dockerignorefor smaller contexts.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| Dockerfile | Multi-stage build and runtime image definition for the gateway + open-core packages/plugins. |
| docker/gateway_docker_params.yaml | Default ROS parameters for running the gateway in Docker (host/port/CORS/refresh). |
| docker/entrypoint.sh | Container entrypoint that sources ROS + workspace and runs gateway_node. |
| .github/workflows/docker-publish.yml | GH Actions workflow to build/push GHCR images for each ROS distro. |
| .dockerignore | Reduces Docker build context size by ignoring build artifacts, docs build output, etc. |
mfaferek93
previously approved these changes
Apr 3, 2026
33c8a5f to
7a94502
Compare
Multi-stage Docker build (builder + runtime) with ROS_DISTRO build arg for multi-distro support. Includes all open-core packages and plugins. Workflow publishes 3 images on push to main: - ghcr.io/selfpatch/ros2_medkit-jazzy:latest - ghcr.io/selfpatch/ros2_medkit-humble:latest - ghcr.io/selfpatch/ros2_medkit-rolling:latest Default config at /etc/ros2_medkit/params.yaml (overridable via volume mount). External plugins can be mounted at /opt/ros2_medkit/plugins/. Closes #342
Update installation.rst Docker section to reference the published GHCR images instead of pointing to selfpatch_demos only. Rewrite tutorials/docker.rst with current image names, external plugin mounting, Docker Compose example with web UI, and building from source with ROS_DISTRO build arg.
- cpp-httplib: detect system package version, build v0.14.3 from source when system package is missing or too old (humble/Ubuntu 22.04) - Add libcpp-httplib-dev and rosbag2_storage_mcap to rosdep skip-keys (installed separately or not available on all distros) - Fix hardcoded jazzy in source command - use ROS_DISTRO env var - Runtime stage: use minimal runtime libs instead of -dev packages - Add curl for healthcheck support Tested locally: jazzy and humble images build and pass health check.
- Add non-root medkit user in runtime stage for production safety - Remove CORS wildcard default - disabled by default, opt-in via config - Fix entrypoint --ros-args duplication - CMD now includes --ros-args, entrypoint passes args directly without injecting --ros-args - Fix apt-cache show running without apt-get update (stale cache) - Use repository_owner in workflow instead of hardcoded selfpatch - Fix version-info example in docs to use placeholder - Clarify plugin mount comment about explicit path configuration
Move COLCON_WS from /root/ws to /home/medkit/ws in the runtime stage so the medkit user can access the installed workspace. Use COLCON_WS env var in entrypoint instead of hardcoded /root path. Fix docs to reflect CORS being disabled by default.
Add ros2_medkit_gateway.ros__parameters wrapper to the CORS YAML snippet so users who copy-paste it get a working configuration.
7a94502 to
ada6f5b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request
Summary
Add multi-stage Dockerfile and GitHub Actions workflow to publish gateway Docker images to GHCR. Supports all 3 distros via
ROS_DISTRObuild arg.Images published on push to main:
ghcr.io/selfpatch/ros2_medkit-jazzy:latestghcr.io/selfpatch/ros2_medkit-humble:latestghcr.io/selfpatch/ros2_medkit-rolling:latestAll open-core packages and plugins included. External plugins mountable at
/opt/ros2_medkit/plugins/, default config overridable via volume mount at/etc/ros2_medkit/params.yaml.Issue
Type
Testing
docker build -t ros2_medkit:test ./api/v1/healthand/api/v1/version-infoChecklist