Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ros] add labels with sha of ros packages to invalidate cache #8786

Merged

Conversation

mikaelarguedas
Copy link
Contributor

Update all ros images to use the new way of invalidating cache for each new sync of ROS packages.
This adds labels with the sha of the ros packages installed. relates to osrf/docker_images#112 and osrf/docker_images#376

@tianon
Copy link
Member

tianon commented Sep 28, 2020

This seems like kind of a funky solution that's functionally not really any different/better than just embedding a timestamp that gets updated -- can't the packages themselves be verified by these checksums somehow so that this is functional data instead of just informational?


See also #3540 (comment), especially:

We don't actively recommend using labels. If an image maintainer wants to have labels, that is fine, but label names should adhere to the image spec: https://github.com/opencontainers/image-spec/blob/v1.0.1/annotations.md

@mikaelarguedas
Copy link
Contributor Author

Thanks @tianon for the feedback

This seems like kind of a funky solution that's functionally not really any different/better than just embedding a timestamp that gets updated

Indeed, in both approaches (timestamp or sha) we're restricted by the fact that they will be different depending on the architecture, packages for different arches being built at different times and not having the same sha while the Dockerfile is common to all architectures.

can't the packages themselves be verified by these checksums somehow so that this is functional data instead of just informational?

This would require to get the different shas for each arch and then conditionnaly check them adding extra logic in the dockerfile.

If an image maintainer wants to have labels, that is fine, but label names should adhere to the image spec: https://github.com/opencontainers/image-spec/blob/v1.0.1/annotations.md

I thought the labels generated in these dockerfiles were complying with the rules defined in that document. Could you point to which rule is violated by the current approach ?

I'm happy to consider another solution allowing to break cache when the packages change without adding arch specific logic in the dockerfiles. We converged on the sha one as it seemed to tick all the boxes on our side. Would you prefer for the labels to use the timestamps instead of the sha ?

@ruffsl
Copy link
Contributor

ruffsl commented Oct 2, 2020

Could you point to which rule is violated by the current approach ?

Perhaps @tianon is alluding to this point?

Keys SHOULD be named using a reverse domain notation - e.g. com.example.myKey.

We could change the labels to something like:

LABEL org.ros.ros-melodic-ros-comm.sha256=...
LABEL org.osrfoundation.gazebo10.sha256=...

Would you prefer for the labels to use the timestamps instead of the sha ?

Agreed, this would be an Ok alternative, as we'd like to avoid any architecture specific embedding in the Dockerfiles. One issue with using timestamps however is that there doesn't seem to be a way to query the timestamp on a per package basis from the apt source list repo. That's a point I think is important, as we don't want to break the build cache if merely an unrelated package in the same package list file is changed, and not all packages include build time stamps in there package version ID.

http://packages.ros.org/ros2/ubuntu/dists/focal/main/binary-amd64/Packages

@yosifkit
Copy link
Member

yosifkit commented Oct 2, 2020

Yes, any labels do need to be reverse DNS style (and conform to any other requirements in the image-spec).


The other part he was trying to point out is that these sha256 LABELs are just as useless as sticking a timestamp there since its only purpose is to break the build cache at that point, but it doesn't guarantee anything about what gets installed.

It comes down to the repeatability section; any image listed in a library/ file will be rebuilt if the dependent parent image is rebuilt and we regenerate all Debian and Ubuntu images at least monthly.

@ruffsl
Copy link
Contributor

ruffsl commented Oct 15, 2020

Yes, any labels do need to be reverse DNS style (and conform to any other requirements in the image-spec).

Done


its only purpose is to break the build cache at that point

Correct, but this is a strict monotonic improvement over what exists currently.

it doesn't guarantee anything about what gets installed.

We are limited by the package versioning and distribution software that package.ros.org is currently reliant upon, as well as by the templating CI for our Dockerfiles. We can revisit this infrastructure with alternatives, but in the interim, we have a number of releases/updates backing up, that should be upstreamed to the registry.

@yosifkit
Copy link
Member

improvement over what exists currently

Improvement in what way? Breaking the build cache with unused data will result in the data becoming stale and irrelevant to the image.

Let's try a scenario. The Dockerfile "pins" to a specific version like 0.9.1-2* along with a corresponding ENV ...sha256=zzz. Say that Dockerfile is built and installs a version like 0.9.1-2~0 which probably corresponds to the sha256 in some way. Then a few days/weeks later, the base Ubuntu image is rebuilt (as we do every ~30 days) and so the same Dockerfile for ros is rebuilt. This time it installs something like version 0.9.1-2~1. This updated version has nothing to do with the corresponding ENV ...sha256 that is part of the image.

@ruffsl
Copy link
Contributor

ruffsl commented Oct 21, 2020

Let's try a scenario.

Yet, the scenario you described is already analogous to the current status quo... :(

And without us having any means to break the build cache, the ROS packages become stale and irrelevant to the current release of the ROS distro, unless we wait ~30 days for the base Ubuntu image to rebuild. This is just an internal LABEL to ratchet up, as package.ros.org has no support for ratcheting down anyhow. Timestamps could work just as well, but wouldn't be as deterministically derivable. The benefit of triggering image rebuilds for package updates in a timely and controlled manner seems to outway the cons of an otherwise unused LABEL becoming stale before our CI can open a PR minutes later.

We elected to not use the ENV directive, as to avoid clobberin the environment with values irrelevant to the end user. Using build ARGs could be a suitable alternative, but I don't think that's available to us here.

@github-actions
Copy link

github-actions bot commented Nov 6, 2020

Diff for 1d7273e:
diff --git a/_bashbrew-cat b/_bashbrew-cat
index a7672a4..123b07f 100644
--- a/_bashbrew-cat
+++ b/_bashbrew-cat
@@ -3,160 +3,160 @@ GitRepo: https://github.com/osrf/docker_images.git
 
 Tags: dashing-ros-core, dashing-ros-core-bionic
 Architectures: amd64, arm32v7, arm64v8
-GitCommit: 0eae97e0fa2b34e99d684d88565553b1d67cc590
+GitCommit: 04ec552de26d6cc17823ff6e1de0191c136d94f8
 Directory: ros/dashing/ubuntu/bionic/ros-core
 
 Tags: eloquent-ros-core, eloquent-ros-core-bionic
 Architectures: amd64, arm32v7, arm64v8
-GitCommit: 0b33e61b5bbed5b93b9fba2d5bae5db604ff9b58
+GitCommit: 421722cdc4b6b3fa5ec3697f851130435454a059
 Directory: ros/eloquent/ubuntu/bionic/ros-core
 
 Tags: foxy-ros-core, foxy-ros-core-focal
 Architectures: amd64, arm64v8
-GitCommit: 30496b03a10f37d3ee54d5df672a0c27e0ab3952
+GitCommit: 30b9700f23b1e1e4745919de1eacc93e9543a939
 Directory: ros/foxy/ubuntu/focal/ros-core
 
 Tags: kinetic-ros-core, kinetic-ros-core-xenial
 Architectures: amd64, arm32v7, arm64v8
-GitCommit: 0b33e61b5bbed5b93b9fba2d5bae5db604ff9b58
+GitCommit: 1c7a5895537e7909774bb8e634d549acd2d71cc9
 Directory: ros/kinetic/ubuntu/xenial/ros-core
 
 Tags: melodic-ros-core, melodic-ros-core-bionic
 Architectures: amd64, arm32v7, arm64v8
-GitCommit: 0b33e61b5bbed5b93b9fba2d5bae5db604ff9b58
+GitCommit: 421722cdc4b6b3fa5ec3697f851130435454a059
 Directory: ros/melodic/ubuntu/bionic/ros-core
 
 Tags: melodic-ros-core-stretch
 Architectures: amd64, arm64v8
-GitCommit: 0b33e61b5bbed5b93b9fba2d5bae5db604ff9b58
+GitCommit: 421722cdc4b6b3fa5ec3697f851130435454a059
 Directory: ros/melodic/debian/stretch/ros-core
 
 Tags: noetic-ros-core, noetic-ros-core-focal
 Architectures: amd64, arm32v7, arm64v8
-GitCommit: bba0ef85a9b417f3815d2cba3b36e7754611a428
+GitCommit: 421722cdc4b6b3fa5ec3697f851130435454a059
 Directory: ros/noetic/ubuntu/focal/ros-core
 
 Tags: noetic-ros-core-buster
 Architectures: amd64, arm64v8
-GitCommit: bba0ef85a9b417f3815d2cba3b36e7754611a428
+GitCommit: 421722cdc4b6b3fa5ec3697f851130435454a059
 Directory: ros/noetic/debian/buster/ros-core
 
 Tags: rolling-ros-core, rolling-ros-core-focal
 Architectures: amd64, arm64v8
-GitCommit: f8cfc3fa7ee88d6b59ae18deedd179b8de4c3eb2
+GitCommit: 421722cdc4b6b3fa5ec3697f851130435454a059
 Directory: ros/rolling/ubuntu/focal/ros-core
 
 Tags: dashing-ros-base, dashing-ros-base-bionic, dashing
 Architectures: amd64, arm32v7, arm64v8
-GitCommit: 0eae97e0fa2b34e99d684d88565553b1d67cc590
+GitCommit: 04ec552de26d6cc17823ff6e1de0191c136d94f8
 Directory: ros/dashing/ubuntu/bionic/ros-base
 
 Tags: eloquent-ros-base, eloquent-ros-base-bionic, eloquent
 Architectures: amd64, arm32v7, arm64v8
-GitCommit: 0b33e61b5bbed5b93b9fba2d5bae5db604ff9b58
+GitCommit: 421722cdc4b6b3fa5ec3697f851130435454a059
 Directory: ros/eloquent/ubuntu/bionic/ros-base
 
 Tags: foxy-ros-base, foxy-ros-base-focal, foxy, latest
 Architectures: amd64, arm64v8
-GitCommit: 30496b03a10f37d3ee54d5df672a0c27e0ab3952
+GitCommit: 30b9700f23b1e1e4745919de1eacc93e9543a939
 Directory: ros/foxy/ubuntu/focal/ros-base
 
 Tags: kinetic-ros-base, kinetic-ros-base-xenial, kinetic
 Architectures: amd64, arm32v7, arm64v8
-GitCommit: 0b33e61b5bbed5b93b9fba2d5bae5db604ff9b58
+GitCommit: 1c7a5895537e7909774bb8e634d549acd2d71cc9
 Directory: ros/kinetic/ubuntu/xenial/ros-base
 
 Tags: melodic-ros-base, melodic-ros-base-bionic, melodic
 Architectures: amd64, arm32v7, arm64v8
-GitCommit: 0b33e61b5bbed5b93b9fba2d5bae5db604ff9b58
+GitCommit: 421722cdc4b6b3fa5ec3697f851130435454a059
 Directory: ros/melodic/ubuntu/bionic/ros-base
 
 Tags: melodic-ros-base-stretch
 Architectures: amd64, arm64v8
-GitCommit: 0b33e61b5bbed5b93b9fba2d5bae5db604ff9b58
+GitCommit: 421722cdc4b6b3fa5ec3697f851130435454a059
 Directory: ros/melodic/debian/stretch/ros-base
 
 Tags: noetic-ros-base, noetic-ros-base-focal, noetic
 Architectures: amd64, arm32v7, arm64v8
-GitCommit: cc4e832f92bcac995b9a2c9ca8a7b8fcf85c5c28
+GitCommit: 421722cdc4b6b3fa5ec3697f851130435454a059
 Directory: ros/noetic/ubuntu/focal/ros-base
 
 Tags: noetic-ros-base-buster
 Architectures: amd64, arm64v8
-GitCommit: cc4e832f92bcac995b9a2c9ca8a7b8fcf85c5c28
+GitCommit: 421722cdc4b6b3fa5ec3697f851130435454a059
 Directory: ros/noetic/debian/buster/ros-base
 
 Tags: rolling-ros-base, rolling-ros-base-focal, rolling
 Architectures: amd64, arm64v8
-GitCommit: f8cfc3fa7ee88d6b59ae18deedd179b8de4c3eb2
+GitCommit: 421722cdc4b6b3fa5ec3697f851130435454a059
 Directory: ros/rolling/ubuntu/focal/ros-base
 
 Tags: dashing-ros1-bridge, dashing-ros1-bridge-bionic
 Architectures: amd64, arm32v7, arm64v8
-GitCommit: 92b0c6f7753fc2d7bb7697a57f2871cf3895180e
+GitCommit: 04ec552de26d6cc17823ff6e1de0191c136d94f8
 Directory: ros/dashing/ubuntu/bionic/ros1-bridge
 
 Tags: eloquent-ros1-bridge, eloquent-ros1-bridge-bionic
 Architectures: amd64, arm32v7, arm64v8
-GitCommit: 576e10eb03567a24596c88d515026c84a2ea0dec
+GitCommit: 0885dd6fd1a8c465828a76c99b348826a62205be
 Directory: ros/eloquent/ubuntu/bionic/ros1-bridge
 
 Tags: foxy-ros1-bridge, foxy-ros1-bridge-focal
 Architectures: amd64, arm64v8
-GitCommit: 947dddf543e6e788fd58dabc38ea4371091787e3
+GitCommit: 30b9700f23b1e1e4745919de1eacc93e9543a939
 Directory: ros/foxy/ubuntu/focal/ros1-bridge
 
 Tags: kinetic-perception, kinetic-perception-xenial
 Architectures: amd64, arm32v7, arm64v8
-GitCommit: 7ff09c2a75e902bc2bb25a1f1ae748ec4e9c7a4b
+GitCommit: 1c7a5895537e7909774bb8e634d549acd2d71cc9
 Directory: ros/kinetic/ubuntu/xenial/perception
 
 Tags: kinetic-robot, kinetic-robot-xenial
 Architectures: amd64, arm32v7, arm64v8
-GitCommit: 7ff09c2a75e902bc2bb25a1f1ae748ec4e9c7a4b
+GitCommit: 1c7a5895537e7909774bb8e634d549acd2d71cc9
 Directory: ros/kinetic/ubuntu/xenial/robot
 
 Tags: melodic-perception, melodic-perception-bionic
 Architectures: amd64, arm32v7, arm64v8
-GitCommit: 7ff09c2a75e902bc2bb25a1f1ae748ec4e9c7a4b
+GitCommit: 421722cdc4b6b3fa5ec3697f851130435454a059
 Directory: ros/melodic/ubuntu/bionic/perception
 
 Tags: melodic-perception-stretch
 Architectures: amd64, arm64v8
-GitCommit: 7ff09c2a75e902bc2bb25a1f1ae748ec4e9c7a4b
+GitCommit: 421722cdc4b6b3fa5ec3697f851130435454a059
 Directory: ros/melodic/debian/stretch/perception
 
 Tags: melodic-robot, melodic-robot-bionic
 Architectures: amd64, arm32v7, arm64v8
-GitCommit: 7ff09c2a75e902bc2bb25a1f1ae748ec4e9c7a4b
+GitCommit: 421722cdc4b6b3fa5ec3697f851130435454a059
 Directory: ros/melodic/ubuntu/bionic/robot
 
 Tags: melodic-robot-stretch
 Architectures: amd64, arm64v8
-GitCommit: 7ff09c2a75e902bc2bb25a1f1ae748ec4e9c7a4b
+GitCommit: 421722cdc4b6b3fa5ec3697f851130435454a059
 Directory: ros/melodic/debian/stretch/robot
 
 Tags: noetic-perception, noetic-perception-focal
 Architectures: amd64, arm32v7, arm64v8
-GitCommit: bba0ef85a9b417f3815d2cba3b36e7754611a428
+GitCommit: 421722cdc4b6b3fa5ec3697f851130435454a059
 Directory: ros/noetic/ubuntu/focal/perception
 
 Tags: noetic-perception-buster
 Architectures: amd64, arm64v8
-GitCommit: bba0ef85a9b417f3815d2cba3b36e7754611a428
+GitCommit: 421722cdc4b6b3fa5ec3697f851130435454a059
 Directory: ros/noetic/debian/buster/perception
 
 Tags: noetic-robot, noetic-robot-focal
 Architectures: amd64, arm32v7, arm64v8
-GitCommit: bba0ef85a9b417f3815d2cba3b36e7754611a428
+GitCommit: 421722cdc4b6b3fa5ec3697f851130435454a059
 Directory: ros/noetic/ubuntu/focal/robot
 
 Tags: noetic-robot-buster
 Architectures: amd64, arm64v8
-GitCommit: bba0ef85a9b417f3815d2cba3b36e7754611a428
+GitCommit: 421722cdc4b6b3fa5ec3697f851130435454a059
 Directory: ros/noetic/debian/buster/robot
 
 Tags: rolling-ros1-bridge, rolling-ros1-bridge-focal
 Architectures: amd64, arm64v8
-GitCommit: c098e08c9e9a077516dbba9648893e89aecf1d63
+GitCommit: 421722cdc4b6b3fa5ec3697f851130435454a059
 Directory: ros/rolling/ubuntu/focal/ros1-bridge
diff --git a/ros_dashing-ros-core-bionic/Dockerfile b/ros_dashing-ros-core-bionic/Dockerfile
index 95d7bcc..daca694 100644
--- a/ros_dashing-ros-core-bionic/Dockerfile
+++ b/ros_dashing-ros-core-bionic/Dockerfile
@@ -27,6 +27,9 @@ ENV LC_ALL C.UTF-8
 
 ENV ROS_DISTRO dashing
 
+# label ros2 packages
+LABEL org.osrfoundation.ros-dashing-ros-core.sha256=a22eb2c489fac515521b12d7dcddb11bee38add6e289b3d0037cd2bd17d457e3
+
 # install ros2 packages
 RUN apt-get update && apt-get install -y --no-install-recommends \
     ros-dashing-ros-core=0.7.4-1* \
diff --git a/ros_dashing-ros1-bridge-bionic/Dockerfile b/ros_dashing-ros1-bridge-bionic/Dockerfile
index fc18a8a..842ef29 100644
--- a/ros_dashing-ros1-bridge-bionic/Dockerfile
+++ b/ros_dashing-ros1-bridge-bionic/Dockerfile
@@ -10,6 +10,12 @@ RUN echo "deb http://packages.ros.org/ros/ubuntu bionic main" > /etc/apt/sources
 
 ENV ROS1_DISTRO melodic
 ENV ROS2_DISTRO dashing
+
+# label ros packages
+LABEL org.osrfoundation.ros-melodic-ros-comm.sha256=41f220c83c352d5a3cecaad37614920c8a7c338480e4083699d7f1d1eae06fc4 \
+      org.osrfoundation.ros-melodic-roscpp-tutorials.sha256=f49fca05c2692ea5c58107c155fb708a7c40b76ff6e90c3fc223c4c0e47fd083 \
+      org.osrfoundation.ros-melodic-rospy-tutorials.sha256=b990f747b59195d9bd749581737f1fb0bd289e8e1389e32d26024bc6101d7922
+
 # install ros packages
 RUN apt-get update && apt-get install -y --no-install-recommends \
     ros-melodic-ros-comm=1.14.9-1* \
@@ -17,9 +23,14 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
     ros-melodic-rospy-tutorials=0.9.3-1* \
     && rm -rf /var/lib/apt/lists/*
 
+# label ros2 packages
+LABEL org.osrfoundation.ros-dashing-ros1-bridge.sha256=89dc5e37c76978bb5a6595fcf6a8679fe4e8e1db5739faf02878c1dab3db6149 \
+      org.osrfoundation.ros-dashing-demo-nodes-cpp.sha256=600f8292528e8f1847ebf62a3bce4bc8449f968e15b663c399d63f6bc290853d \
+      org.osrfoundation.ros-dashing-demo-nodes-py.sha256=282bbc6427108155fd331f9265271d1fea131535f4a7f523699eccb6c66678a2
+
 # install ros2 packages
 RUN apt-get update && apt-get install -y --no-install-recommends \
-    ros-dashing-ros1-bridge=0.7.6-1* \
+    ros-dashing-ros1-bridge=0.7.6-3* \
     ros-dashing-demo-nodes-cpp=0.7.9-1* \
     ros-dashing-demo-nodes-py=0.7.9-1* \
     && rm -rf /var/lib/apt/lists/*
diff --git a/ros_dashing/Dockerfile b/ros_dashing/Dockerfile
index 54d49c5..f2bc95c 100644
--- a/ros_dashing/Dockerfile
+++ b/ros_dashing/Dockerfile
@@ -24,6 +24,9 @@ RUN colcon mixin add default \
       https://raw.githubusercontent.com/colcon/colcon-metadata-repository/master/index.yaml && \
     colcon metadata update
 
+# label ros2 packages
+LABEL org.osrfoundation.ros-dashing-ros-base.sha256=12179b6ee23dffe54e835b26afa82d7a1099918d7924bad14e10934f9ee81d62
+
 # install ros2 packages
 RUN apt-get update && apt-get install -y --no-install-recommends \
     ros-dashing-ros-base=0.7.4-1* \
diff --git a/ros_eloquent-ros-core-bionic/Dockerfile b/ros_eloquent-ros-core-bionic/Dockerfile
index 4bee053..e502c82 100644
--- a/ros_eloquent-ros-core-bionic/Dockerfile
+++ b/ros_eloquent-ros-core-bionic/Dockerfile
@@ -27,6 +27,9 @@ ENV LC_ALL C.UTF-8
 
 ENV ROS_DISTRO eloquent
 
+# label ros2 packages
+LABEL org.osrfoundation.ros-eloquent-ros-core.sha256=7b375ff186ab1f16ab82986720e3e47471d25d7d62b15e35b5bab96ba4dc9638
+
 # install ros2 packages
 RUN apt-get update && apt-get install -y --no-install-recommends \
     ros-eloquent-ros-core=0.8.4-1* \
diff --git a/ros_eloquent-ros1-bridge-bionic/Dockerfile b/ros_eloquent-ros1-bridge-bionic/Dockerfile
index 2f831bc..baae5b3 100644
--- a/ros_eloquent-ros1-bridge-bionic/Dockerfile
+++ b/ros_eloquent-ros1-bridge-bionic/Dockerfile
@@ -10,6 +10,12 @@ RUN echo "deb http://packages.ros.org/ros/ubuntu bionic main" > /etc/apt/sources
 
 ENV ROS1_DISTRO melodic
 ENV ROS2_DISTRO eloquent
+
+# label ros packages
+LABEL org.osrfoundation.ros-melodic-ros-comm.sha256=41f220c83c352d5a3cecaad37614920c8a7c338480e4083699d7f1d1eae06fc4 \
+      org.osrfoundation.ros-melodic-roscpp-tutorials.sha256=f49fca05c2692ea5c58107c155fb708a7c40b76ff6e90c3fc223c4c0e47fd083 \
+      org.osrfoundation.ros-melodic-rospy-tutorials.sha256=b990f747b59195d9bd749581737f1fb0bd289e8e1389e32d26024bc6101d7922
+
 # install ros packages
 RUN apt-get update && apt-get install -y --no-install-recommends \
     ros-melodic-ros-comm=1.14.9-1* \
@@ -17,9 +23,14 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
     ros-melodic-rospy-tutorials=0.9.3-1* \
     && rm -rf /var/lib/apt/lists/*
 
+# label ros2 packages
+LABEL org.osrfoundation.ros-eloquent-ros1-bridge.sha256=678988e1c257e8433f426db2c28e65c189f85eac82fdb4084101d3d0124c4e0e \
+      org.osrfoundation.ros-eloquent-demo-nodes-cpp.sha256=e07fd5f0b1afbd1695b5afb0a8e6d8bcba213ff1690fe5c8768a364578d0fcfc \
+      org.osrfoundation.ros-eloquent-demo-nodes-py.sha256=36cc41b867918c9a2206ec8d1a1643529523fce4d876736e85c285e6fd9f2d5f
+
 # install ros2 packages
 RUN apt-get update && apt-get install -y --no-install-recommends \
-    ros-eloquent-ros1-bridge=0.8.2-1* \
+    ros-eloquent-ros1-bridge=0.8.2-3* \
     ros-eloquent-demo-nodes-cpp=0.8.4-1* \
     ros-eloquent-demo-nodes-py=0.8.4-1* \
     && rm -rf /var/lib/apt/lists/*
diff --git a/ros_eloquent/Dockerfile b/ros_eloquent/Dockerfile
index e5541f5..d9639a2 100644
--- a/ros_eloquent/Dockerfile
+++ b/ros_eloquent/Dockerfile
@@ -24,6 +24,9 @@ RUN colcon mixin add default \
       https://raw.githubusercontent.com/colcon/colcon-metadata-repository/master/index.yaml && \
     colcon metadata update
 
+# label ros2 packages
+LABEL org.osrfoundation.ros-eloquent-ros-base.sha256=3ba498156ca86b1f528ee57cdaf26908ec5bfc883047dd3661dcebef48fba399
+
 # install ros2 packages
 RUN apt-get update && apt-get install -y --no-install-recommends \
     ros-eloquent-ros-base=0.8.4-1* \
diff --git a/ros_foxy-ros-core-focal/Dockerfile b/ros_foxy-ros-core-focal/Dockerfile
index fc6c1fc..dfa45d0 100644
--- a/ros_foxy-ros-core-focal/Dockerfile
+++ b/ros_foxy-ros-core-focal/Dockerfile
@@ -27,6 +27,9 @@ ENV LC_ALL C.UTF-8
 
 ENV ROS_DISTRO foxy
 
+# label ros2 packages
+LABEL org.osrfoundation.ros-foxy-ros-core.sha256=f92d627616c551f729881dd87e1099c661a7c4f1841bc5dfd7d58798b5e0380f
+
 # install ros2 packages
 RUN apt-get update && apt-get install -y --no-install-recommends \
     ros-foxy-ros-core=0.9.2-1* \
diff --git a/ros_foxy-ros1-bridge-focal/Dockerfile b/ros_foxy-ros1-bridge-focal/Dockerfile
index e363888..46dfe89 100644
--- a/ros_foxy-ros1-bridge-focal/Dockerfile
+++ b/ros_foxy-ros1-bridge-focal/Dockerfile
@@ -10,6 +10,12 @@ RUN echo "deb http://packages.ros.org/ros/ubuntu focal main" > /etc/apt/sources.
 
 ENV ROS1_DISTRO noetic
 ENV ROS2_DISTRO foxy
+
+# label ros packages
+LABEL org.osrfoundation.ros-noetic-ros-comm.sha256=b8d39823702d406fe69711e480c9fc66fedd9d0e7c93a31346ed3b6988f65125 \
+      org.osrfoundation.ros-noetic-roscpp-tutorials.sha256=a293deba1a35d59ff6af41946780af26d4e55ff201bb1809b72f16eb70be5880 \
+      org.osrfoundation.ros-noetic-rospy-tutorials.sha256=2423a9c2740190282bcda1d4cf2b99480df0dc05a15c17e82b5662ba1d79e553
+
 # install ros packages
 RUN apt-get update && apt-get install -y --no-install-recommends \
     ros-noetic-ros-comm=1.15.8-1* \
@@ -17,6 +23,11 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
     ros-noetic-rospy-tutorials=0.10.2-1* \
     && rm -rf /var/lib/apt/lists/*
 
+# label ros2 packages
+LABEL org.osrfoundation.ros-foxy-ros1-bridge.sha256=50f85fd7284a28ec22815e8cdf1be99f27a46bbc48bcc2aae9683ad16e1ff3cf \
+      org.osrfoundation.ros-foxy-demo-nodes-cpp.sha256=e9e9dc92cfb319212d2a85049b5a3b9231dfb01140be357a0acd7866eef67d05 \
+      org.osrfoundation.ros-foxy-demo-nodes-py.sha256=2ed35ba68b6f77c10b2525a7eb8c4f6730be33176f589d16d67c7299e9eb6e84
+
 # install ros2 packages
 RUN apt-get update && apt-get install -y --no-install-recommends \
     ros-foxy-ros1-bridge=0.9.4-1* \
diff --git a/ros_kinetic-perception-xenial/Dockerfile b/ros_kinetic-perception-xenial/Dockerfile
index 9508d49..b746d0b 100644
--- a/ros_kinetic-perception-xenial/Dockerfile
+++ b/ros_kinetic-perception-xenial/Dockerfile
@@ -2,6 +2,9 @@
 # generated from docker_images/create_ros_image.Dockerfile.em
 FROM ros:kinetic-ros-base-xenial
 
+# label ros packages
+LABEL org.osrfoundation.ros-kinetic-perception.sha256=d17bc4e9469df635191f613427c10f4435bc31940abe259d4bde1af26e34154b
+
 # install ros packages
 RUN apt-get update && apt-get install -y --no-install-recommends \
     ros-kinetic-perception=1.3.2-0* \
diff --git a/ros_kinetic-robot-xenial/Dockerfile b/ros_kinetic-robot-xenial/Dockerfile
index c25faef..96c3a85 100644
--- a/ros_kinetic-robot-xenial/Dockerfile
+++ b/ros_kinetic-robot-xenial/Dockerfile
@@ -2,6 +2,9 @@
 # generated from docker_images/create_ros_image.Dockerfile.em
 FROM ros:kinetic-ros-base-xenial
 
+# label ros packages
+LABEL org.osrfoundation.ros-kinetic-robot.sha256=340baaf17b7e8608ff24dc66b70754d56d145e8d48f8b6c968f79df6857be32b
+
 # install ros packages
 RUN apt-get update && apt-get install -y --no-install-recommends \
     ros-kinetic-robot=1.3.2-0* \
diff --git a/ros_kinetic-ros-core-xenial/Dockerfile b/ros_kinetic-ros-core-xenial/Dockerfile
index d030f14..4e1cc42 100644
--- a/ros_kinetic-ros-core-xenial/Dockerfile
+++ b/ros_kinetic-ros-core-xenial/Dockerfile
@@ -20,6 +20,9 @@ ENV LC_ALL C.UTF-8
 
 ENV ROS_DISTRO kinetic
 
+# label ros packages
+LABEL org.osrfoundation.ros-kinetic-ros-core.sha256=18ab38edb0253676dd289364b9702589b13d9fc6f1d446f7a043efd87b2062d0
+
 # install ros packages
 RUN apt-get update && apt-get install -y --no-install-recommends \
     ros-kinetic-ros-core=1.3.2-0* \
diff --git a/ros_kinetic/Dockerfile b/ros_kinetic/Dockerfile
index 4836712..fba21da 100644
--- a/ros_kinetic/Dockerfile
+++ b/ros_kinetic/Dockerfile
@@ -14,6 +14,9 @@ RUN apt-get update && apt-get install --no-install-recommends -y \
 RUN rosdep init && \
   rosdep update --rosdistro $ROS_DISTRO
 
+# label ros packages
+LABEL org.osrfoundation.ros-kinetic-ros-base.sha256=5ffd747754776b096bb1e2b96f7a3c86d8573ae88206e1e0e5102867a14379a5
+
 # install ros packages
 RUN apt-get update && apt-get install -y --no-install-recommends \
     ros-kinetic-ros-base=1.3.2-0* \
diff --git a/ros_latest/Dockerfile b/ros_latest/Dockerfile
index 1dee5eb..d806411 100644
--- a/ros_latest/Dockerfile
+++ b/ros_latest/Dockerfile
@@ -24,6 +24,9 @@ RUN colcon mixin add default \
       https://raw.githubusercontent.com/colcon/colcon-metadata-repository/master/index.yaml && \
     colcon metadata update
 
+# label ros2 packages
+LABEL org.osrfoundation.ros-foxy-ros-base.sha256=131d5bebf612327472a71cb2bb167a3db6c661eb9e3ea0e200288a3a0af4f558
+
 # install ros2 packages
 RUN apt-get update && apt-get install -y --no-install-recommends \
     ros-foxy-ros-base=0.9.2-1* \
diff --git a/ros_melodic-perception-bionic/Dockerfile b/ros_melodic-perception-bionic/Dockerfile
index 5fc0a66..8c8fee6 100644
--- a/ros_melodic-perception-bionic/Dockerfile
+++ b/ros_melodic-perception-bionic/Dockerfile
@@ -2,6 +2,9 @@
 # generated from docker_images/create_ros_image.Dockerfile.em
 FROM ros:melodic-ros-base-bionic
 
+# label ros packages
+LABEL org.osrfoundation.ros-melodic-perception.sha256=5e42a6ee934d610e7ea6f0a75165915f6875ff8e6fef5acce55f77fdffc12594
+
 # install ros packages
 RUN apt-get update && apt-get install -y --no-install-recommends \
     ros-melodic-perception=1.4.1-0* \
diff --git a/ros_melodic-perception-stretch/Dockerfile b/ros_melodic-perception-stretch/Dockerfile
index 8e495d0..84b9f61 100644
--- a/ros_melodic-perception-stretch/Dockerfile
+++ b/ros_melodic-perception-stretch/Dockerfile
@@ -2,6 +2,9 @@
 # generated from docker_images/create_ros_image.Dockerfile.em
 FROM ros:melodic-ros-base-stretch
 
+# label ros packages
+LABEL org.osrfoundation.ros-melodic-perception.sha256=18457516040a14efd8aeb71df3940e3e71348fb7e48844b1a854527cf44e1166
+
 # install ros packages
 RUN apt-get update && apt-get install -y --no-install-recommends \
     ros-melodic-perception=1.4.1-0* \
diff --git a/ros_melodic-robot-bionic/Dockerfile b/ros_melodic-robot-bionic/Dockerfile
index 273b7db..79c2b72 100644
--- a/ros_melodic-robot-bionic/Dockerfile
+++ b/ros_melodic-robot-bionic/Dockerfile
@@ -2,6 +2,9 @@
 # generated from docker_images/create_ros_image.Dockerfile.em
 FROM ros:melodic-ros-base-bionic
 
+# label ros packages
+LABEL org.osrfoundation.ros-melodic-robot.sha256=8efabb4a68a7cad4ebe2a2270985870a0ecd0fd24428ce3addff67f6a9ef7b74
+
 # install ros packages
 RUN apt-get update && apt-get install -y --no-install-recommends \
     ros-melodic-robot=1.4.1-0* \
diff --git a/ros_melodic-robot-stretch/Dockerfile b/ros_melodic-robot-stretch/Dockerfile
index 417ced8..5324a95 100644
--- a/ros_melodic-robot-stretch/Dockerfile
+++ b/ros_melodic-robot-stretch/Dockerfile
@@ -2,6 +2,9 @@
 # generated from docker_images/create_ros_image.Dockerfile.em
 FROM ros:melodic-ros-base-stretch
 
+# label ros packages
+LABEL org.osrfoundation.ros-melodic-robot.sha256=3d3a96132658b17f2be73a5d39714366cad70a4399a0abb8a7afd5c697cd6d01
+
 # install ros packages
 RUN apt-get update && apt-get install -y --no-install-recommends \
     ros-melodic-robot=1.4.1-0* \
diff --git a/ros_melodic-ros-base-stretch/Dockerfile b/ros_melodic-ros-base-stretch/Dockerfile
index dfb4bc9..9653cc0 100644
--- a/ros_melodic-ros-base-stretch/Dockerfile
+++ b/ros_melodic-ros-base-stretch/Dockerfile
@@ -14,6 +14,9 @@ RUN apt-get update && apt-get install --no-install-recommends -y \
 RUN rosdep init && \
   rosdep update --rosdistro $ROS_DISTRO
 
+# label ros packages
+LABEL org.osrfoundation.ros-melodic-ros-base.sha256=bc473bc4ece92ff09665e735042b4c046c54b3bb724e4b434fd1eb8a4e24bf1e
+
 # install ros packages
 RUN apt-get update && apt-get install -y --no-install-recommends \
     ros-melodic-ros-base=1.4.1-0* \
diff --git a/ros_melodic-ros-core-bionic/Dockerfile b/ros_melodic-ros-core-bionic/Dockerfile
index a7e316a..f8c837e 100644
--- a/ros_melodic-ros-core-bionic/Dockerfile
+++ b/ros_melodic-ros-core-bionic/Dockerfile
@@ -27,6 +27,9 @@ ENV LC_ALL C.UTF-8
 
 ENV ROS_DISTRO melodic
 
+# label ros packages
+LABEL org.osrfoundation.ros-melodic-ros-core.sha256=304454dfe5e3b248a588a5ce651512f6987cf2d9b35594ba6a24e80db1d1d0a5
+
 # install ros packages
 RUN apt-get update && apt-get install -y --no-install-recommends \
     ros-melodic-ros-core=1.4.1-0* \
diff --git a/ros_melodic-ros-core-stretch/Dockerfile b/ros_melodic-ros-core-stretch/Dockerfile
index 0133531..18ca019 100644
--- a/ros_melodic-ros-core-stretch/Dockerfile
+++ b/ros_melodic-ros-core-stretch/Dockerfile
@@ -20,6 +20,9 @@ ENV LC_ALL C.UTF-8
 
 ENV ROS_DISTRO melodic
 
+# label ros packages
+LABEL org.osrfoundation.ros-melodic-ros-core.sha256=2fadb7d785f3eaf40da95929ed1cc379e0f97b93c501e9b7636b22c476233406
+
 # install ros packages
 RUN apt-get update && apt-get install -y --no-install-recommends \
     ros-melodic-ros-core=1.4.1-0* \
diff --git a/ros_melodic/Dockerfile b/ros_melodic/Dockerfile
index e8a911e..2ff5132 100644
--- a/ros_melodic/Dockerfile
+++ b/ros_melodic/Dockerfile
@@ -14,6 +14,9 @@ RUN apt-get update && apt-get install --no-install-recommends -y \
 RUN rosdep init && \
   rosdep update --rosdistro $ROS_DISTRO
 
+# label ros packages
+LABEL org.osrfoundation.ros-melodic-ros-base.sha256=cc0a80a5f43d9f1719eb45aee74953cce0a421908f27130fc1b31b81b7a4a1b9
+
 # install ros packages
 RUN apt-get update && apt-get install -y --no-install-recommends \
     ros-melodic-ros-base=1.4.1-0* \
diff --git a/ros_noetic-perception-buster/Dockerfile b/ros_noetic-perception-buster/Dockerfile
index 1a32080..a3aa2b3 100644
--- a/ros_noetic-perception-buster/Dockerfile
+++ b/ros_noetic-perception-buster/Dockerfile
@@ -2,6 +2,9 @@
 # generated from docker_images/create_ros_image.Dockerfile.em
 FROM ros:noetic-ros-base-buster
 
+# label ros packages
+LABEL org.osrfoundation.ros-noetic-perception.sha256=30c8f7e89173f07882dfd22d230440fcc644d9ca5b13e8484832d1ca07075c56
+
 # install ros packages
 RUN apt-get update && apt-get install -y --no-install-recommends \
     ros-noetic-perception=1.5.0-1* \
diff --git a/ros_noetic-perception-focal/Dockerfile b/ros_noetic-perception-focal/Dockerfile
index 4ab48ba..d016c97 100644
--- a/ros_noetic-perception-focal/Dockerfile
+++ b/ros_noetic-perception-focal/Dockerfile
@@ -2,6 +2,9 @@
 # generated from docker_images/create_ros_image.Dockerfile.em
 FROM ros:noetic-ros-base-focal
 
+# label ros packages
+LABEL org.osrfoundation.ros-noetic-perception.sha256=824900e7dbc57dcd120356bd02e15b999d7fecadd8c5029ccf214e8be58a4503
+
 # install ros packages
 RUN apt-get update && apt-get install -y --no-install-recommends \
     ros-noetic-perception=1.5.0-1* \
diff --git a/ros_noetic-robot-buster/Dockerfile b/ros_noetic-robot-buster/Dockerfile
index af6f24b..0e3ed24 100644
--- a/ros_noetic-robot-buster/Dockerfile
+++ b/ros_noetic-robot-buster/Dockerfile
@@ -2,6 +2,9 @@
 # generated from docker_images/create_ros_image.Dockerfile.em
 FROM ros:noetic-ros-base-buster
 
+# label ros packages
+LABEL org.osrfoundation.ros-noetic-robot.sha256=87f2a3b36f798fc6ed79636c0f91414e2e5eb79594c0b4c1c2d9b9e66b8bd8d2
+
 # install ros packages
 RUN apt-get update && apt-get install -y --no-install-recommends \
     ros-noetic-robot=1.5.0-1* \
diff --git a/ros_noetic-robot-focal/Dockerfile b/ros_noetic-robot-focal/Dockerfile
index b087a26..fb48219 100644
--- a/ros_noetic-robot-focal/Dockerfile
+++ b/ros_noetic-robot-focal/Dockerfile
@@ -2,6 +2,9 @@
 # generated from docker_images/create_ros_image.Dockerfile.em
 FROM ros:noetic-ros-base-focal
 
+# label ros packages
+LABEL org.osrfoundation.ros-noetic-robot.sha256=42eda67763e787d4ebf23a3533e9e63779a03fddbea0b62b49aeb350d76d9f13
+
 # install ros packages
 RUN apt-get update && apt-get install -y --no-install-recommends \
     ros-noetic-robot=1.5.0-1* \
diff --git a/ros_noetic-ros-base-buster/Dockerfile b/ros_noetic-ros-base-buster/Dockerfile
index badb3df..6f2280a 100644
--- a/ros_noetic-ros-base-buster/Dockerfile
+++ b/ros_noetic-ros-base-buster/Dockerfile
@@ -14,6 +14,9 @@ RUN apt-get update && apt-get install --no-install-recommends -y \
 RUN rosdep init && \
   rosdep update --rosdistro $ROS_DISTRO
 
+# label ros packages
+LABEL org.osrfoundation.ros-noetic-ros-base.sha256=bccca78596b9bd871a6875b2cd742e6536816bea1710064bd78a70b249184be3
+
 # install ros packages
 RUN apt-get update && apt-get install -y --no-install-recommends \
     ros-noetic-ros-base=1.5.0-1* \
diff --git a/ros_noetic-ros-core-buster/Dockerfile b/ros_noetic-ros-core-buster/Dockerfile
index 830522f..eaf981a 100644
--- a/ros_noetic-ros-core-buster/Dockerfile
+++ b/ros_noetic-ros-core-buster/Dockerfile
@@ -20,6 +20,9 @@ ENV LC_ALL C.UTF-8
 
 ENV ROS_DISTRO noetic
 
+# label ros packages
+LABEL org.osrfoundation.ros-noetic-ros-core.sha256=988de70cb51fdcd2f9cad634f51189c8edb1722cb2b4c31f78eab3881d3ab49e
+
 # install ros packages
 RUN apt-get update && apt-get install -y --no-install-recommends \
     ros-noetic-ros-core=1.5.0-1* \
diff --git a/ros_noetic-ros-core-focal/Dockerfile b/ros_noetic-ros-core-focal/Dockerfile
index d526d14..3b3a486 100644
--- a/ros_noetic-ros-core-focal/Dockerfile
+++ b/ros_noetic-ros-core-focal/Dockerfile
@@ -27,6 +27,9 @@ ENV LC_ALL C.UTF-8
 
 ENV ROS_DISTRO noetic
 
+# label ros packages
+LABEL org.osrfoundation.ros-noetic-ros-core.sha256=e9b7c447aa79ebf52bec3940cd999216252106732d40625df670bd4eeb9d05a7
+
 # install ros packages
 RUN apt-get update && apt-get install -y --no-install-recommends \
     ros-noetic-ros-core=1.5.0-1* \
diff --git a/ros_noetic/Dockerfile b/ros_noetic/Dockerfile
index 7ff1809..b45cafa 100644
--- a/ros_noetic/Dockerfile
+++ b/ros_noetic/Dockerfile
@@ -14,6 +14,9 @@ RUN apt-get update && apt-get install --no-install-recommends -y \
 RUN rosdep init && \
   rosdep update --rosdistro $ROS_DISTRO
 
+# label ros packages
+LABEL org.osrfoundation.ros-noetic-ros-base.sha256=76719a758c1f82472ae43c7cf89e690f88b06a725849471e33c7073ffc115405
+
 # install ros packages
 RUN apt-get update && apt-get install -y --no-install-recommends \
     ros-noetic-ros-base=1.5.0-1* \
diff --git a/ros_rolling-ros-core-focal/Dockerfile b/ros_rolling-ros-core-focal/Dockerfile
index 52972d7..691ec65 100644
--- a/ros_rolling-ros-core-focal/Dockerfile
+++ b/ros_rolling-ros-core-focal/Dockerfile
@@ -27,9 +27,12 @@ ENV LC_ALL C.UTF-8
 
 ENV ROS_DISTRO rolling
 
+# label ros2 packages
+LABEL org.osrfoundation.ros-rolling-ros-core.sha256=deabba86abbdd5b110e96ed9d6d80a4733f87f7454baf0011bd8b033b9447b64
+
 # install ros2 packages
 RUN apt-get update && apt-get install -y --no-install-recommends \
-    ros-rolling-ros-core=0.9.1-2* \
+    ros-rolling-ros-core=0.9.2-1* \
     && rm -rf /var/lib/apt/lists/*
 
 # setup entrypoint
diff --git a/ros_rolling-ros1-bridge-focal/Dockerfile b/ros_rolling-ros1-bridge-focal/Dockerfile
index 43e9416..1d269bc 100644
--- a/ros_rolling-ros1-bridge-focal/Dockerfile
+++ b/ros_rolling-ros1-bridge-focal/Dockerfile
@@ -10,6 +10,12 @@ RUN echo "deb http://packages.ros.org/ros/ubuntu focal main" > /etc/apt/sources.
 
 ENV ROS1_DISTRO noetic
 ENV ROS2_DISTRO rolling
+
+# label ros packages
+LABEL org.osrfoundation.ros-noetic-ros-comm.sha256=b8d39823702d406fe69711e480c9fc66fedd9d0e7c93a31346ed3b6988f65125 \
+      org.osrfoundation.ros-noetic-roscpp-tutorials.sha256=a293deba1a35d59ff6af41946780af26d4e55ff201bb1809b72f16eb70be5880 \
+      org.osrfoundation.ros-noetic-rospy-tutorials.sha256=2423a9c2740190282bcda1d4cf2b99480df0dc05a15c17e82b5662ba1d79e553
+
 # install ros packages
 RUN apt-get update && apt-get install -y --no-install-recommends \
     ros-noetic-ros-comm=1.15.8-1* \
@@ -17,11 +23,16 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
     ros-noetic-rospy-tutorials=0.10.2-1* \
     && rm -rf /var/lib/apt/lists/*
 
+# label ros2 packages
+LABEL org.osrfoundation.ros-rolling-ros1-bridge.sha256=6c4742a3f7b8d3f171cfa3801d972d737100a81d8ef6bef0d155d7ecb6ba43c7 \
+      org.osrfoundation.ros-rolling-demo-nodes-cpp.sha256=85aefe28c8c8357b44d6fa3c1d2d56a0c8d164a2b3b35e61c66098bbbe92f1f0 \
+      org.osrfoundation.ros-rolling-demo-nodes-py.sha256=ca7fe4e5b0faae51a01519d8c54a8bf8a22d3460f5f4a315c08c190fcd23b6d2
+
 # install ros2 packages
 RUN apt-get update && apt-get install -y --no-install-recommends \
-    ros-rolling-ros1-bridge=0.9.2-2* \
-    ros-rolling-demo-nodes-cpp=0.10.0-1* \
-    ros-rolling-demo-nodes-py=0.10.0-1* \
+    ros-rolling-ros1-bridge=0.9.4-2* \
+    ros-rolling-demo-nodes-cpp=0.10.1-1* \
+    ros-rolling-demo-nodes-py=0.10.1-1* \
     && rm -rf /var/lib/apt/lists/*
 
 # setup entrypoint
diff --git a/ros_rolling/Dockerfile b/ros_rolling/Dockerfile
index c37f255..215f3a1 100644
--- a/ros_rolling/Dockerfile
+++ b/ros_rolling/Dockerfile
@@ -24,8 +24,11 @@ RUN colcon mixin add default \
       https://raw.githubusercontent.com/colcon/colcon-metadata-repository/master/index.yaml && \
     colcon metadata update
 
+# label ros2 packages
+LABEL org.osrfoundation.ros-rolling-ros-base.sha256=6e98799a3af850d0ca15a50b73c7ed1c6f370c19b49c5d8f4bff0fcf5b52ab9d
+
 # install ros2 packages
 RUN apt-get update && apt-get install -y --no-install-recommends \
-    ros-rolling-ros-base=0.9.1-2* \
+    ros-rolling-ros-base=0.9.2-1* \
     && rm -rf /var/lib/apt/lists/*
 

@ruffsl
Copy link
Contributor

ruffsl commented Nov 6, 2020

Could we please get these updates? It seems the ros images are growing quite stale as these release syns have been backing up.

@tianon
Copy link
Member

tianon commented Nov 6, 2020

We're happy to merge the version bumps, but the added LABEL values need more work. If you would like to remove the LABEL updates for now to get the update in, we'd love to move forward on that.

Regarding the issue the LABEL values are trying to solve as I understand it, the biggest problem is that each architecture has a different version number for packages like ros-rolling-ros-base? If you've got something that can generate these sha256 values from relevant data, I don't understand why it can't be used for the version numbers directly (since all the Dockerfiles are generated already using data from the repo), something like the following:

# install ros2 packages
RUN set -eux; \
	arch="$(dpkg --print-architecture)"; \
	case "$arch" in \
		amd64) version='0.9.2-1focal.20201007.223858' ;; \
		arm64) version='0.9.2-1focal.20201008.005415' ;; \
		*) echo >&2 "error: unsupported arch: $arch"; exit 1 ;; \
	esac; \
	apt-get update; \
	apt-get install -y --no-install-recommends ros-rolling-ros-base="$version"; \
	rm -rf /var/lib/apt/lists/*

@ruffsl
Copy link
Contributor

ruffsl commented Nov 6, 2020

We're happy to merge the version bumps, but the added LABEL values need more work. If you would like to remove the LABEL updates for now to get the update in, we'd love to move forward on that.

Could we compromise with using the default field of an ARG directive instead? This would have the benefit over both LABEL and ENV, in that there would be no additional data becoming stale and irrelevant to the image, while still giving us a simple way to ratchet up with release syncs.

- LABEL @(' \\\n      '.join('org.osrfoundation.{name}.sha256={sha256}'.format(**p) for p in packages))@
+ ARG @(' \\\n      '.join('org.osrfoundation.{name}.sha256={sha256}'.format(**p) for p in packages))@

https://docs.docker.com/engine/reference/builder/#default-values
https://github.com/osrf/docker_templates/blob/adad8152da75670c9a157102b322770a931c6b2a/docker_templates/templates/snippet/label_and_install_package_list.Dockerfile.em#L3

If you've got something that can generate these sha256 values from relevant data, I don't understand why it can't be used for the version numbers directly

Switching to set default ARG value could also be implemented in a few minutes today, where as we'd otherwise have to overhaul our template infrastructure and CI backend, given it was never designed for generating Dockerfiles that support multiple CPU architectures simultaneously; as this all predates multiarch support for DockerHub.

Regardless, let us know. It would take a while if we have to heavily refactor our template designs, as we are mainly volunteer maintainers.

@tianon
Copy link
Member

tianon commented Nov 6, 2020

What I'm suggesting is that you simply remove that line as a temporary change for now (since ubuntu has had a recent update, and the version bumps you need will cause a rebuild anyhow, so the problem it is solving is not relevant right this second).

@ruffsl
Copy link
Contributor

ruffsl commented Nov 17, 2020

What I'm suggesting is that you simply remove that line as a temporary change for now

Done now in 09e7488

(since ubuntu has had a recent update, and the version bumps you need will cause a rebuild anyhow, so the problem it is solving is not relevant right this second)

The underlying issue will persists though, regardless if ubuntu gets an update once in a while. I think ARG would be a nice compromise here, allowing our CI to submit PRs to break the build cache, without the potential of baking stale info into the image binaries.

@yosifkit
Copy link
Member

Diff:
diff --git a/_bashbrew-cat b/_bashbrew-cat
index a7672a4..27adbd7 100644
--- a/_bashbrew-cat
+++ b/_bashbrew-cat
@@ -3,160 +3,160 @@ GitRepo: https://github.com/osrf/docker_images.git
 
 Tags: dashing-ros-core, dashing-ros-core-bionic
 Architectures: amd64, arm32v7, arm64v8
-GitCommit: 0eae97e0fa2b34e99d684d88565553b1d67cc590
+GitCommit: df19ab7d5993d3b78a908362cdcd1479a8e78b35
 Directory: ros/dashing/ubuntu/bionic/ros-core
 
 Tags: eloquent-ros-core, eloquent-ros-core-bionic
 Architectures: amd64, arm32v7, arm64v8
-GitCommit: 0b33e61b5bbed5b93b9fba2d5bae5db604ff9b58
+GitCommit: df19ab7d5993d3b78a908362cdcd1479a8e78b35
 Directory: ros/eloquent/ubuntu/bionic/ros-core
 
 Tags: foxy-ros-core, foxy-ros-core-focal
 Architectures: amd64, arm64v8
-GitCommit: 30496b03a10f37d3ee54d5df672a0c27e0ab3952
+GitCommit: df19ab7d5993d3b78a908362cdcd1479a8e78b35
 Directory: ros/foxy/ubuntu/focal/ros-core
 
 Tags: kinetic-ros-core, kinetic-ros-core-xenial
 Architectures: amd64, arm32v7, arm64v8
-GitCommit: 0b33e61b5bbed5b93b9fba2d5bae5db604ff9b58
+GitCommit: df19ab7d5993d3b78a908362cdcd1479a8e78b35
 Directory: ros/kinetic/ubuntu/xenial/ros-core
 
 Tags: melodic-ros-core, melodic-ros-core-bionic
 Architectures: amd64, arm32v7, arm64v8
-GitCommit: 0b33e61b5bbed5b93b9fba2d5bae5db604ff9b58
+GitCommit: df19ab7d5993d3b78a908362cdcd1479a8e78b35
 Directory: ros/melodic/ubuntu/bionic/ros-core
 
 Tags: melodic-ros-core-stretch
 Architectures: amd64, arm64v8
-GitCommit: 0b33e61b5bbed5b93b9fba2d5bae5db604ff9b58
+GitCommit: df19ab7d5993d3b78a908362cdcd1479a8e78b35
 Directory: ros/melodic/debian/stretch/ros-core
 
 Tags: noetic-ros-core, noetic-ros-core-focal
 Architectures: amd64, arm32v7, arm64v8
-GitCommit: bba0ef85a9b417f3815d2cba3b36e7754611a428
+GitCommit: df19ab7d5993d3b78a908362cdcd1479a8e78b35
 Directory: ros/noetic/ubuntu/focal/ros-core
 
 Tags: noetic-ros-core-buster
 Architectures: amd64, arm64v8
-GitCommit: bba0ef85a9b417f3815d2cba3b36e7754611a428
+GitCommit: df19ab7d5993d3b78a908362cdcd1479a8e78b35
 Directory: ros/noetic/debian/buster/ros-core
 
 Tags: rolling-ros-core, rolling-ros-core-focal
 Architectures: amd64, arm64v8
-GitCommit: f8cfc3fa7ee88d6b59ae18deedd179b8de4c3eb2
+GitCommit: df19ab7d5993d3b78a908362cdcd1479a8e78b35
 Directory: ros/rolling/ubuntu/focal/ros-core
 
 Tags: dashing-ros-base, dashing-ros-base-bionic, dashing
 Architectures: amd64, arm32v7, arm64v8
-GitCommit: 0eae97e0fa2b34e99d684d88565553b1d67cc590
+GitCommit: df19ab7d5993d3b78a908362cdcd1479a8e78b35
 Directory: ros/dashing/ubuntu/bionic/ros-base
 
 Tags: eloquent-ros-base, eloquent-ros-base-bionic, eloquent
 Architectures: amd64, arm32v7, arm64v8
-GitCommit: 0b33e61b5bbed5b93b9fba2d5bae5db604ff9b58
+GitCommit: df19ab7d5993d3b78a908362cdcd1479a8e78b35
 Directory: ros/eloquent/ubuntu/bionic/ros-base
 
 Tags: foxy-ros-base, foxy-ros-base-focal, foxy, latest
 Architectures: amd64, arm64v8
-GitCommit: 30496b03a10f37d3ee54d5df672a0c27e0ab3952
+GitCommit: df19ab7d5993d3b78a908362cdcd1479a8e78b35
 Directory: ros/foxy/ubuntu/focal/ros-base
 
 Tags: kinetic-ros-base, kinetic-ros-base-xenial, kinetic
 Architectures: amd64, arm32v7, arm64v8
-GitCommit: 0b33e61b5bbed5b93b9fba2d5bae5db604ff9b58
+GitCommit: df19ab7d5993d3b78a908362cdcd1479a8e78b35
 Directory: ros/kinetic/ubuntu/xenial/ros-base
 
 Tags: melodic-ros-base, melodic-ros-base-bionic, melodic
 Architectures: amd64, arm32v7, arm64v8
-GitCommit: 0b33e61b5bbed5b93b9fba2d5bae5db604ff9b58
+GitCommit: df19ab7d5993d3b78a908362cdcd1479a8e78b35
 Directory: ros/melodic/ubuntu/bionic/ros-base
 
 Tags: melodic-ros-base-stretch
 Architectures: amd64, arm64v8
-GitCommit: 0b33e61b5bbed5b93b9fba2d5bae5db604ff9b58
+GitCommit: df19ab7d5993d3b78a908362cdcd1479a8e78b35
 Directory: ros/melodic/debian/stretch/ros-base
 
 Tags: noetic-ros-base, noetic-ros-base-focal, noetic
 Architectures: amd64, arm32v7, arm64v8
-GitCommit: cc4e832f92bcac995b9a2c9ca8a7b8fcf85c5c28
+GitCommit: df19ab7d5993d3b78a908362cdcd1479a8e78b35
 Directory: ros/noetic/ubuntu/focal/ros-base
 
 Tags: noetic-ros-base-buster
 Architectures: amd64, arm64v8
-GitCommit: cc4e832f92bcac995b9a2c9ca8a7b8fcf85c5c28
+GitCommit: df19ab7d5993d3b78a908362cdcd1479a8e78b35
 Directory: ros/noetic/debian/buster/ros-base
 
 Tags: rolling-ros-base, rolling-ros-base-focal, rolling
 Architectures: amd64, arm64v8
-GitCommit: f8cfc3fa7ee88d6b59ae18deedd179b8de4c3eb2
+GitCommit: df19ab7d5993d3b78a908362cdcd1479a8e78b35
 Directory: ros/rolling/ubuntu/focal/ros-base
 
 Tags: dashing-ros1-bridge, dashing-ros1-bridge-bionic
 Architectures: amd64, arm32v7, arm64v8
-GitCommit: 92b0c6f7753fc2d7bb7697a57f2871cf3895180e
+GitCommit: df19ab7d5993d3b78a908362cdcd1479a8e78b35
 Directory: ros/dashing/ubuntu/bionic/ros1-bridge
 
 Tags: eloquent-ros1-bridge, eloquent-ros1-bridge-bionic
 Architectures: amd64, arm32v7, arm64v8
-GitCommit: 576e10eb03567a24596c88d515026c84a2ea0dec
+GitCommit: df19ab7d5993d3b78a908362cdcd1479a8e78b35
 Directory: ros/eloquent/ubuntu/bionic/ros1-bridge
 
 Tags: foxy-ros1-bridge, foxy-ros1-bridge-focal
 Architectures: amd64, arm64v8
-GitCommit: 947dddf543e6e788fd58dabc38ea4371091787e3
+GitCommit: df19ab7d5993d3b78a908362cdcd1479a8e78b35
 Directory: ros/foxy/ubuntu/focal/ros1-bridge
 
 Tags: kinetic-perception, kinetic-perception-xenial
 Architectures: amd64, arm32v7, arm64v8
-GitCommit: 7ff09c2a75e902bc2bb25a1f1ae748ec4e9c7a4b
+GitCommit: df19ab7d5993d3b78a908362cdcd1479a8e78b35
 Directory: ros/kinetic/ubuntu/xenial/perception
 
 Tags: kinetic-robot, kinetic-robot-xenial
 Architectures: amd64, arm32v7, arm64v8
-GitCommit: 7ff09c2a75e902bc2bb25a1f1ae748ec4e9c7a4b
+GitCommit: df19ab7d5993d3b78a908362cdcd1479a8e78b35
 Directory: ros/kinetic/ubuntu/xenial/robot
 
 Tags: melodic-perception, melodic-perception-bionic
 Architectures: amd64, arm32v7, arm64v8
-GitCommit: 7ff09c2a75e902bc2bb25a1f1ae748ec4e9c7a4b
+GitCommit: df19ab7d5993d3b78a908362cdcd1479a8e78b35
 Directory: ros/melodic/ubuntu/bionic/perception
 
 Tags: melodic-perception-stretch
 Architectures: amd64, arm64v8
-GitCommit: 7ff09c2a75e902bc2bb25a1f1ae748ec4e9c7a4b
+GitCommit: df19ab7d5993d3b78a908362cdcd1479a8e78b35
 Directory: ros/melodic/debian/stretch/perception
 
 Tags: melodic-robot, melodic-robot-bionic
 Architectures: amd64, arm32v7, arm64v8
-GitCommit: 7ff09c2a75e902bc2bb25a1f1ae748ec4e9c7a4b
+GitCommit: df19ab7d5993d3b78a908362cdcd1479a8e78b35
 Directory: ros/melodic/ubuntu/bionic/robot
 
 Tags: melodic-robot-stretch
 Architectures: amd64, arm64v8
-GitCommit: 7ff09c2a75e902bc2bb25a1f1ae748ec4e9c7a4b
+GitCommit: df19ab7d5993d3b78a908362cdcd1479a8e78b35
 Directory: ros/melodic/debian/stretch/robot
 
 Tags: noetic-perception, noetic-perception-focal
 Architectures: amd64, arm32v7, arm64v8
-GitCommit: bba0ef85a9b417f3815d2cba3b36e7754611a428
+GitCommit: df19ab7d5993d3b78a908362cdcd1479a8e78b35
 Directory: ros/noetic/ubuntu/focal/perception
 
 Tags: noetic-perception-buster
 Architectures: amd64, arm64v8
-GitCommit: bba0ef85a9b417f3815d2cba3b36e7754611a428
+GitCommit: df19ab7d5993d3b78a908362cdcd1479a8e78b35
 Directory: ros/noetic/debian/buster/perception
 
 Tags: noetic-robot, noetic-robot-focal
 Architectures: amd64, arm32v7, arm64v8
-GitCommit: bba0ef85a9b417f3815d2cba3b36e7754611a428
+GitCommit: df19ab7d5993d3b78a908362cdcd1479a8e78b35
 Directory: ros/noetic/ubuntu/focal/robot
 
 Tags: noetic-robot-buster
 Architectures: amd64, arm64v8
-GitCommit: bba0ef85a9b417f3815d2cba3b36e7754611a428
+GitCommit: df19ab7d5993d3b78a908362cdcd1479a8e78b35
 Directory: ros/noetic/debian/buster/robot
 
 Tags: rolling-ros1-bridge, rolling-ros1-bridge-focal
 Architectures: amd64, arm64v8
-GitCommit: c098e08c9e9a077516dbba9648893e89aecf1d63
+GitCommit: df19ab7d5993d3b78a908362cdcd1479a8e78b35
 Directory: ros/rolling/ubuntu/focal/ros1-bridge
diff --git a/ros_dashing-ros1-bridge-bionic/Dockerfile b/ros_dashing-ros1-bridge-bionic/Dockerfile
index fc18a8a..7c453fe 100644
--- a/ros_dashing-ros1-bridge-bionic/Dockerfile
+++ b/ros_dashing-ros1-bridge-bionic/Dockerfile
@@ -10,16 +10,17 @@ RUN echo "deb http://packages.ros.org/ros/ubuntu bionic main" > /etc/apt/sources
 
 ENV ROS1_DISTRO melodic
 ENV ROS2_DISTRO dashing
+
 # install ros packages
 RUN apt-get update && apt-get install -y --no-install-recommends \
-    ros-melodic-ros-comm=1.14.9-1* \
+    ros-melodic-ros-comm=1.14.10-1* \
     ros-melodic-roscpp-tutorials=0.9.3-1* \
     ros-melodic-rospy-tutorials=0.9.3-1* \
     && rm -rf /var/lib/apt/lists/*
 
 # install ros2 packages
 RUN apt-get update && apt-get install -y --no-install-recommends \
-    ros-dashing-ros1-bridge=0.7.6-1* \
+    ros-dashing-ros1-bridge=0.7.6-3* \
     ros-dashing-demo-nodes-cpp=0.7.9-1* \
     ros-dashing-demo-nodes-py=0.7.9-1* \
     && rm -rf /var/lib/apt/lists/*
diff --git a/ros_eloquent-ros1-bridge-bionic/Dockerfile b/ros_eloquent-ros1-bridge-bionic/Dockerfile
index 2f831bc..852f51e 100644
--- a/ros_eloquent-ros1-bridge-bionic/Dockerfile
+++ b/ros_eloquent-ros1-bridge-bionic/Dockerfile
@@ -10,16 +10,17 @@ RUN echo "deb http://packages.ros.org/ros/ubuntu bionic main" > /etc/apt/sources
 
 ENV ROS1_DISTRO melodic
 ENV ROS2_DISTRO eloquent
+
 # install ros packages
 RUN apt-get update && apt-get install -y --no-install-recommends \
-    ros-melodic-ros-comm=1.14.9-1* \
+    ros-melodic-ros-comm=1.14.10-1* \
     ros-melodic-roscpp-tutorials=0.9.3-1* \
     ros-melodic-rospy-tutorials=0.9.3-1* \
     && rm -rf /var/lib/apt/lists/*
 
 # install ros2 packages
 RUN apt-get update && apt-get install -y --no-install-recommends \
-    ros-eloquent-ros1-bridge=0.8.2-1* \
+    ros-eloquent-ros1-bridge=0.8.2-3* \
     ros-eloquent-demo-nodes-cpp=0.8.4-1* \
     ros-eloquent-demo-nodes-py=0.8.4-1* \
     && rm -rf /var/lib/apt/lists/*
diff --git a/ros_rolling-ros-core-focal/Dockerfile b/ros_rolling-ros-core-focal/Dockerfile
index 52972d7..a099ebc 100644
--- a/ros_rolling-ros-core-focal/Dockerfile
+++ b/ros_rolling-ros-core-focal/Dockerfile
@@ -29,7 +29,7 @@ ENV ROS_DISTRO rolling
 
 # install ros2 packages
 RUN apt-get update && apt-get install -y --no-install-recommends \
-    ros-rolling-ros-core=0.9.1-2* \
+    ros-rolling-ros-core=0.9.2-1* \
     && rm -rf /var/lib/apt/lists/*
 
 # setup entrypoint
diff --git a/ros_rolling-ros1-bridge-focal/Dockerfile b/ros_rolling-ros1-bridge-focal/Dockerfile
index 43e9416..26fbc7d 100644
--- a/ros_rolling-ros1-bridge-focal/Dockerfile
+++ b/ros_rolling-ros1-bridge-focal/Dockerfile
@@ -19,9 +20,9 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
 
 # install ros2 packages
 RUN apt-get update && apt-get install -y --no-install-recommends \
-    ros-rolling-ros1-bridge=0.9.2-2* \
-    ros-rolling-demo-nodes-cpp=0.10.0-1* \
-    ros-rolling-demo-nodes-py=0.10.0-1* \
+    ros-rolling-ros1-bridge=0.9.4-2* \
+    ros-rolling-demo-nodes-cpp=0.10.1-1* \
+    ros-rolling-demo-nodes-py=0.10.1-1* \
     && rm -rf /var/lib/apt/lists/*
 
 # setup entrypoint
diff --git a/ros_rolling/Dockerfile b/ros_rolling/Dockerfile
index c37f255..60ce2c0 100644
--- a/ros_rolling/Dockerfile
+++ b/ros_rolling/Dockerfile
@@ -26,6 +26,6 @@ RUN colcon mixin add default \
 
 # install ros2 packages
 RUN apt-get update && apt-get install -y --no-install-recommends \
-    ros-rolling-ros-base=0.9.1-2* \
+    ros-rolling-ros-base=0.9.2-1* \
     && rm -rf /var/lib/apt/lists/*
 

@yosifkit yosifkit merged commit 8813779 into docker-library:master Nov 18, 2020
@ruffsl ruffsl deleted the ros-add-hash-labels branch February 23, 2022 21:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants