Skip to content

Commit 096453f

Browse files
committed
Update outdated Dockerfile (#1262)
This PR updates an outdated Dockerfile. Key changes: - Update current Dockerfile - Addition of Docker guidance in README pointing to Dockerfile Fix: #1261
1 parent 740857e commit 096453f

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

Dockerfile

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Create an image configured with ROS2 including colcon, Nodejs and rclnodejs source
22
# Supported ARGS:
3-
# ROS_DISTRO = [foxy, galactic, humble, rolling], default=rolling
4-
# NODE_MAJOR_VER = [12, 14, 16, 18, 19], default=19
3+
# ROS_DISTRO = [humble, jazzy, kilted, rolling], default=rolling
4+
# NODE_MAJOR_VER = [20, 22, 24], default=22
55
# BRANCH = rclnodejs git branch, default=develop
66
#
77
# examples:
@@ -14,11 +14,11 @@
1414
#
1515
# Build an image for a specific branch of rclnodejs, version of ROS2 and Nodejs use:
1616
#
17-
# docker build -t <image_name> --build-arg DISTRO=galactic .
17+
# docker build -t <image_name> --build-arg ROS_DISTRO=kilted .
1818
# docker build -t <image_name> \
19-
# --build-arg ROS_DISTRO=humble \
20-
# --build-arg BRANCH=humble-hawksbill \
21-
# --build-arg NODE_MAJOR_VER=18 .
19+
# --build-arg ROS_DISTRO=jazzy \
20+
# --build-arg BRANCH=develop \
21+
# --build-arg NODE_MAJOR_VER=22 .
2222
#
2323
#
2424
# Build and run:
@@ -30,7 +30,7 @@ ARG ROS_DISTRO=rolling
3030
FROM ros:${ROS_DISTRO}
3131

3232
# Install dependencies, including Nodejs
33-
ARG NODE_MAJOR_VER=19
33+
ARG NODE_MAJOR_VER=22
3434
RUN apt-get update -y \
3535
&& apt-get install -y curl sudo \
3636
&& curl -fsSL https://deb.nodesource.com/setup_${NODE_MAJOR_VER}.x | sudo -E bash - \
@@ -41,8 +41,8 @@ ARG BRANCH=develop
4141
WORKDIR /rosdev
4242
SHELL ["/bin/bash", "-c"]
4343
RUN source /opt/ros/${ROS_DISTRO}/setup.bash \
44-
&& apt install ros-${ROS_DISTRO}-test-msgs \
45-
&& apt install ros-${ROS_DISTRO}-example-interfaces \
44+
&& apt-get install -y ros-${ROS_DISTRO}-test-msgs \
45+
&& apt-get install -y ros-${ROS_DISTRO}-example-interfaces \
4646
&& git clone -b ${BRANCH} --single-branch https://github.com/RobotWebTools/rclnodejs.git \
4747
&& cd /rosdev/rclnodejs \
4848
&& npm i

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ npm i rclnodejs
5050

5151
> **Note:** To install rclnodejs from GitHub: add `"rclnodejs":"RobotWebTools/rclnodejs#<branch>"` to your `package.json` dependency section.
5252
53+
> **Docker:** For containerized development, see the included [Dockerfile](./Dockerfile) for building and testing with different ROS distributions and Node.js versions.
54+
5355
See the [features](./docs/FEATURES.md) and try the [examples](https://github.com/RobotWebTools/rclnodejs/tree/develop/example) to get started.
5456

5557
## rclnodejs-cli

0 commit comments

Comments
 (0)