Skip to content

Conversation

@mikaelarguedas
Copy link
Contributor

@mikaelarguedas mikaelarguedas commented May 31, 2025

Follow-up of #114

Addresses: #115

What it does:

  • Add back old logic for EOL images so snapshots based images are still able to install packages
    example resulting diff for Iron:
diff --git a/ros/iron/ubuntu/jammy/ros-core/Dockerfile b/ros/iron/ubuntu/jammy/ros-core/Dockerfile
index 172d938..482c5d0 100644
--- a/ros/iron/ubuntu/jammy/ros-core/Dockerfile
+++ b/ros/iron/ubuntu/jammy/ros-core/Dockerfile
@@ -11,10 +11,13 @@ RUN echo 'Etc/UTC' > /etc/timezone && \
 
 # install packages
 RUN apt-get update && apt-get install -q -y --no-install-recommends \
+    ca-certificates \
+    curl \
     dirmngr \
     gnupg2 \
     && rm -rf /var/lib/apt/lists/*
 
+
 # setup keys
 RUN set -eux; \
        key='4B63CF8FDE49746E98FA01DDAD19BAB3CBF125EA'; \
  • For non EOL: evaluate ros{2}-apt-source version at Dockerfile generation time so a version change will burst docker cache
  • Fix broken ros2 source/testing template to test the ros2-testing apt repo configuration:
Tested the following diff and it's working successfully
 # setup timezone
 RUN echo 'Etc/UTC' > /etc/timezone && \
@@ -9,27 +12,17 @@ RUN echo 'Etc/UTC' > /etc/timezone && \
 
 # install packages
 RUN apt-get update && apt-get install -q -y --no-install-recommends \
+    ca-certificates \
+    curl \
     dirmngr \
     gnupg2 \
     && rm -rf /var/lib/apt/lists/*
 
-# setup keys
-RUN set -eux; \
-       key='C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654'; \
-       export GNUPGHOME="$(mktemp -d)"; \
-       gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$key"; \
-       mkdir -p /usr/share/keyrings; \
-       gpg --batch --export "$key" > /usr/share/keyrings/ros2-testing-archive-keyring.gpg; \
-       gpgconf --kill all; \
-       rm -rf "$GNUPGHOME"
 
-# setup sources.list
-RUN echo "deb [ signed-by=/usr/share/keyrings/ros2-testing-archive-keyring.gpg ] http://packages.ros.org/ros2-testing/ubuntu noble main" > /etc/apt/sources.list.d/ros2-testing.list
-
-# setup environment
-ENV LANG C.UTF-8
-ENV LC_ALL C.UTF-8
-ENV ROS_DISTRO rolling
+RUN curl -L -s -o /tmp/ros2-testing-apt-source.deb "https://github.com/ros-infrastructure/ros-apt-source/releases/download/1.1.0/ros2-testing-apt-source_1.1.0.$(. /etc/os-release && echo $VERSION_CODENAME)_all.deb" \
+    && apt-get update \
+    && apt-get install /tmp/ros2-testing-apt-source.deb \
+    && rm -f /tmp/ros2-testing-apt-source.deb

 # install bootstrap tools
 RUN apt-get update && apt-get install --no-install-recommends -y \
@@ -41,6 +34,11 @@ RUN apt-get update && apt-get install --no-install-recommends -y \
     python3-vcstool \
     && rm -rf /var/lib/apt/lists/*
 
+# setup environment
+ENV ROS_DISTRO=rolling
+ENV LANG=C.UTF-8
+ENV LC_ALL=C.UTF-8

Signed-off-by: Mikael Arguedas <mikael.arguedas@gmail.com>
Signed-off-by: Mikael Arguedas <mikael.arguedas@gmail.com>
Signed-off-by: Mikael Arguedas <mikael.arguedas@gmail.com>
Signed-off-by: Mikael Arguedas <mikael.arguedas@gmail.com>
Signed-off-by: Mikael Arguedas <mikael.arguedas@gmail.com>
@mikaelarguedas mikaelarguedas force-pushed the follow-up-templates-114 branch from ab800f6 to 30e8f7a Compare June 3, 2025 06:17
Signed-off-by: Mikael Arguedas <mikael.arguedas@gmail.com>
@mikaelarguedas

This comment was marked as outdated.

Signed-off-by: Mikael Arguedas <mikael.arguedas@gmail.com>
Copy link
Contributor

@tfoote tfoote left a comment

Choose a reason for hiding this comment

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

Looks good to me.

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.

4 participants