Skip to content

Commit 2e125d0

Browse files
Update Dockerfile/CI tool versions (#424)
* Update nvm version in Dockerfile * (Dockerfile) convert node_version to arg * (Dockerfile) small syntax change * (actions) make node_version configurable
1 parent b51f21b commit 2e125d0

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

.github/workflows/main.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,12 @@ jobs:
1010
fail-fast: false
1111
matrix:
1212
ros_distro: [kinetic, melodic] # Temp remove noetic waitng for release of tf2_web_republisher
13+
node_version: [14]
1314
steps:
1415
- uses: actions/checkout@v2
1516
- name: Docker pull
1617
run: docker pull ros:${{ matrix.ros_distro }}-ros-core
1718
- name: Docker build
18-
run: docker build --build-arg ROS_DISTRO="${{ matrix.ros_distro }}" -t roslibjsdocker .
19+
run: docker build --build-arg ROS_DISTRO="${{ matrix.ros_distro }}" --build-arg NODE_VERSION="${{ matrix.node_version }}" -t roslibjsdocker .
1920
- name: Tests
2021
run: docker run -v $(pwd):/root/roslibjs --rm roslibjsdocker bash -i -c 'bash /root/roslibjs/test/build.bash'

Dockerfile

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ FROM ros:$ROS_DISTRO-ros-core
55
RUN apt update && apt-get install -y xvfb firefox git wget ros-$ROS_DISTRO-rosbridge-server ros-$ROS_DISTRO-tf2-web-republisher ros-$ROS_DISTRO-common-tutorials ros-$ROS_DISTRO-rospy-tutorials ros-$ROS_DISTRO-actionlib-tutorials
66

77
# Install nvm, Node.js and node-gyp
8-
ENV NODE_VERSION=v10.15.0
9-
RUN wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.33.2/install.sh | bash \
8+
ARG NODE_VERSION=14
9+
RUN wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash \
1010
&& . $HOME/.nvm/nvm.sh \
1111
&& nvm install $NODE_VERSION && nvm alias default $NODE_VERSION \
1212
&& npm install -g node-gyp
1313

1414
RUN echo "source /opt/ros/$ROS_DISTRO/setup.bash" >> $HOME/.bashrc
15-
ENV PATH /bin/versions/node/$NODE_VERSION/bin:$PATH
15+
ENV PATH=/bin/versions/node/$NODE_VERSION/bin:$PATH

0 commit comments

Comments
 (0)