File tree Expand file tree Collapse file tree 2 files changed +16
-7
lines changed Expand file tree Collapse file tree 2 files changed +16
-7
lines changed Original file line number Diff line number Diff line change 11FROM almalinux:8
22ARG ROS_DISTRO=rolling
33
4- # install ros
5- ADD http://packages.ros.org/ros2/rhel/ros2.repo /etc/yum.repos.d/ros2.repo
4+
5+ # ROS prerequisites
6+ # see https://docs.ros.org/en/humble/Installation/RHEL-Install-RPMs.html
67RUN dnf install \
78 'dnf-command(config-manager)' \
89 epel-release \
@@ -16,6 +17,11 @@ RUN dnf install \
1617 && dnf config-manager --set-enabled powertools \
1718 && dnf clean all
1819
20+ # Setup Sources
21+ 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}') && \
22+ dnf install -y "https://github.com/ros-infrastructure/ros-apt-source/releases/download/${ROS_APT_SOURCE_VERSION}/ros2-release-${ROS_APT_SOURCE_VERSION}-1.noarch.rpm"
23+
24+ # install ros
1925ENV ROS_DISTRO=${ROS_DISTRO}
2026RUN dnf install -y ros-${ROS_DISTRO}-ros-base \
2127 python3-rosdep \
Original file line number Diff line number Diff line change @@ -3,14 +3,17 @@ ARG ROS_DISTRO=rolling
33
44# ROS prerequisites
55# see https://docs.ros.org/en/rolling/Installation/RHEL-Install-RPMs.html
6- RUN dnf install -y langpacks-en glibc-langpack-en \
7- && dnf clean all && \
6+ RUN dnf install -y langpacks-en glibc-langpack-en && \
87 export LANG=en_US.UTF-8 && \
98 dnf install -y 'dnf-command(config-manager)' epel-release && \
10- dnf config-manager --set-enabled crb
9+ dnf config-manager --set-enabled crb && \
10+ dnf clean all
1111
12- # COPY http://packages.ros.org/ros2/rhel/ros2.repo /etc/yum.repos.d/ros2.repo
13- ADD http://packages.ros.org/ros2-testing/rhel/ros2-testing.repo /etc/yum.repos.d/ros2.repo
12+ # Setup Sources
13+ 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}') && \
14+ dnf install -y "https://github.com/ros-infrastructure/ros-apt-source/releases/download/${ROS_APT_SOURCE_VERSION}/ros2-release-${ROS_APT_SOURCE_VERSION}-1.noarch.rpm"
15+
16+ # install ros
1417RUN dnf makecache -y
1518RUN dnf install -y \
1619 gcc-c++ \
You can’t perform that action at this time.
0 commit comments