Skip to content

Commit eb5634c

Browse files
committed
Explicitly encode apt keys 1.1.0 and their checksums in the Dockerfile at generation time
Using results of osrf/docker_templates#117
1 parent 13a4d90 commit eb5634c

File tree

4 files changed

+20
-20
lines changed

4 files changed

+20
-20
lines changed

ros/humble/ubuntu/jammy/ros-core/Dockerfile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ RUN apt-get update && apt-get install -q -y --no-install-recommends \
1818
&& rm -rf /var/lib/apt/lists/*
1919

2020

21-
# NOTE: this doesnt deal with snapshots repo as not clear what to install for those..
22-
# NOTE: How do we break cache and ensure rebuild if that version changes ?
23-
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}') ;\
24-
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" \
21+
# Setup ROS Apt sources
22+
RUN curl -L -s -o /tmp/ros2-apt-source.deb https://github.com/ros-infrastructure/ros-apt-source/releases/download/1.1.0/ros2-apt-source_1.1.0.jammy_all.deb \
23+
&& echo "1600cb8cc28258a39bffc1736a75bcbf52d1f2db371a4d020c1b187d2a5a083b /tmp/ros2-apt-source.deb" | sha256sum --strict --check \
2524
&& apt-get update \
2625
&& apt-get install /tmp/ros2-apt-source.deb \
27-
&& rm -f /tmp/ros2-apt-source.deb
26+
&& rm -f /tmp/ros2-apt-source.deb \
27+
&& rm -rf /var/lib/apt/lists/*
2828

2929
# setup environment
3030
ENV LANG=C.UTF-8

ros/jazzy/ubuntu/noble/ros-core/Dockerfile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ RUN apt-get update && apt-get install -q -y --no-install-recommends \
1818
&& rm -rf /var/lib/apt/lists/*
1919

2020

21-
# NOTE: this doesnt deal with snapshots repo as not clear what to install for those..
22-
# NOTE: How do we break cache and ensure rebuild if that version changes ?
23-
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}') ;\
24-
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" \
21+
# Setup ROS Apt sources
22+
RUN curl -L -s -o /tmp/ros2-apt-source.deb https://github.com/ros-infrastructure/ros-apt-source/releases/download/1.1.0/ros2-apt-source_1.1.0.noble_all.deb \
23+
&& echo "35441f3092fd05773a3c397fab38661bec466584c7a1f1c05366579997cb5fe7 /tmp/ros2-apt-source.deb" | sha256sum --strict --check \
2524
&& apt-get update \
2625
&& apt-get install /tmp/ros2-apt-source.deb \
27-
&& rm -f /tmp/ros2-apt-source.deb
26+
&& rm -f /tmp/ros2-apt-source.deb \
27+
&& rm -rf /var/lib/apt/lists/*
2828

2929
# setup environment
3030
ENV LANG=C.UTF-8

ros/kilted/ubuntu/noble/ros-core/Dockerfile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ RUN apt-get update && apt-get install -q -y --no-install-recommends \
1818
&& rm -rf /var/lib/apt/lists/*
1919

2020

21-
# NOTE: this doesnt deal with snapshots repo as not clear what to install for those..
22-
# NOTE: How do we break cache and ensure rebuild if that version changes ?
23-
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}') ;\
24-
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" \
21+
# Setup ROS Apt sources
22+
RUN curl -L -s -o /tmp/ros2-apt-source.deb https://github.com/ros-infrastructure/ros-apt-source/releases/download/1.1.0/ros2-apt-source_1.1.0.noble_all.deb \
23+
&& echo "35441f3092fd05773a3c397fab38661bec466584c7a1f1c05366579997cb5fe7 /tmp/ros2-apt-source.deb" | sha256sum --strict --check \
2524
&& apt-get update \
2625
&& apt-get install /tmp/ros2-apt-source.deb \
27-
&& rm -f /tmp/ros2-apt-source.deb
26+
&& rm -f /tmp/ros2-apt-source.deb \
27+
&& rm -rf /var/lib/apt/lists/*
2828

2929
# setup environment
3030
ENV LANG=C.UTF-8

ros/rolling/ubuntu/noble/ros-core/Dockerfile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ RUN apt-get update && apt-get install -q -y --no-install-recommends \
1818
&& rm -rf /var/lib/apt/lists/*
1919

2020

21-
# NOTE: this doesnt deal with snapshots repo as not clear what to install for those..
22-
# NOTE: How do we break cache and ensure rebuild if that version changes ?
23-
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}') ;\
24-
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" \
21+
# Setup ROS Apt sources
22+
RUN curl -L -s -o /tmp/ros2-apt-source.deb https://github.com/ros-infrastructure/ros-apt-source/releases/download/1.1.0/ros2-apt-source_1.1.0.noble_all.deb \
23+
&& echo "35441f3092fd05773a3c397fab38661bec466584c7a1f1c05366579997cb5fe7 /tmp/ros2-apt-source.deb" | sha256sum --strict --check \
2524
&& apt-get update \
2625
&& apt-get install /tmp/ros2-apt-source.deb \
27-
&& rm -f /tmp/ros2-apt-source.deb
26+
&& rm -f /tmp/ros2-apt-source.deb \
27+
&& rm -rf /var/lib/apt/lists/*
2828

2929
# setup environment
3030
ENV LANG=C.UTF-8

0 commit comments

Comments
 (0)