File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22FROM osrf/ros:jazzy-desktop-full AS vrx-base
33
44# Workaround from https://discourse.ros.org/t/ros-signing-key-migration-guide/43937
5- RUN rm /etc/apt/sources.list.d/ros2-latest.list \
6- && rm /usr/share/keyrings/ros2-latest-archive-keyring.gpg
5+ RUN rm -f /etc/apt/sources.list.d/ros2-latest.list \
6+ && rm -f /usr/share/keyrings/ros2-latest-archive-keyring.gpg
77
8- RUN apt-get update \
9- && apt-get install -y ca-certificates curl
10-
11- RUN export ROS_APT_SOURCE_VERSION=$(curl -s https://api.github.com/repos/ros-infrastructure/ros-apt-source/releases/latest | grep -F "tag_name" | awk -F\" '{print $4}') ;\
12- curl -L -s -o /tmp/ros2-apt-source.deb "https://github.com/ros-infrastructure/ros-apt-source/releases/download/${ROS_APT_SOURCE_VERSION}/ros2-apt-source_${ROS_APT_SOURCE_VERSION}.$(. /etc/os-release && echo $VERSION_CODENAME)_all.deb" \
13- && apt-get update \
14- && apt-get install /tmp/ros2-apt-source.deb \
15- && rm -f /tmp/ros2-apt-source.deb
8+ # Only install ros2-apt-source if it's not already installed
9+ RUN if ! dpkg -l | grep -q ros2-apt-source; then \
10+ apt-get update && \
11+ apt-get install -y ca-certificates curl && \
12+ export ROS_APT_SOURCE_VERSION=$(curl -s https://api.github.com/repos/ros-infrastructure/ros-apt-source/releases/latest | grep -F "tag_name" | awk -F\" '{print $4}') && \
13+ curl -L -s -o /tmp/ros2-apt-source.deb "https://github.com/ros-infrastructure/ros-apt-source/releases/download/${ROS_APT_SOURCE_VERSION}/ros2-apt-source_${ROS_APT_SOURCE_VERSION}.$(. /etc/os-release && echo $VERSION_CODENAME)_all.deb" && \
14+ apt-get update && \
15+ apt-get install /tmp/ros2-apt-source.deb && \
16+ rm -f /tmp/ros2-apt-source.deb; \
17+ fi
1618
1719ENV DEBIAN_FRONTEND=noninteractive
1820
You can’t perform that action at this time.
0 commit comments