Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dockerfile - running rclnodejs in Docker #893

Merged
merged 1 commit into from
Feb 24, 2023

Conversation

wayneparrott
Copy link
Collaborator

This PR introduces a Dockerfile for running rclnodejs with different versions of ROS2 and Nodejs. Prior to switching to Github Actions, a Dockerfile was provided for creating images for testing rclnodejs. This new Dockerfile restores that previous capability as well as provides a working example for developers interested in developing rclnodejs-based solutions on Docker.

The Docker file can be customized as shown below to create images based on any combination of rclnodejs git branch, ROS2 version and Nodejs version.

# Create an image configured with ROS2 including colcon, Nodejs and rclnodejs source 
# Supported ARGS:
#   ROS_DISTRO = [foxy, galactic, humble, rolling], default=rolling
#   NODE_MAJOR_VER = [12, 14, 16, 18, 19], default=19
#   BRANCH = rclnodejs git branch, default=develop
#
# examples: 
#
# Build image named 'rclnodejs' and run it with the rclnode test suite
#
#    docker build -t rclnodejs  .
#    docker run -it rclnodejs npm test
#
#
# Build an image for a specific branch of rclnodejs, version of ROS2 and Nodejs use:
#
#     docker build -t <image_name> --build-arg DISTRO=galactic .
#     docker build -t <image_name>  \
#        --build-arg ROS_DISTRO=humble \
#        --build-arg BRANCH=humble-hawksbill \
#        --build-arg NODE_MAJOR_VER=18 .
#
#
# Build and run:
#     docker run -it --rm $(docker build -q .)
#

@wayneparrott
Copy link
Collaborator Author

The current Windows build failures are due issue #890

Copy link
Member

@minggangw minggangw left a comment

Choose a reason for hiding this comment

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

LGTM! This is really needed by many developers, thanks!

@minggangw minggangw merged commit 0ea952f into RobotWebTools:develop Feb 24, 2023
wayneparrott added a commit to wayneparrott/rclnodejs that referenced this pull request Feb 26, 2023
@wayneparrott wayneparrott deleted the dockerfile_dev branch March 2, 2023 18:44
minggangw pushed a commit that referenced this pull request Apr 3, 2023
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