ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

How to get an older version of ros::rolling Docker image

asked 2023-01-15 17:10:46 -0600

AndyZe gravatar image

Due to nav2 not being quite up-to-date, I can't use nav2 with official ros::rolling docker image. Here's the nav2 issue that has details on that: https://github.com/ros-planning/navig...

While waiting for the nav2 issues to be fixed, is it possible to get an older version of the ros::rolling docker image?

My Dockerfile starts with this:

FROM ros:rolling  # Would like to roll this back one version

@tfoote

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2023-01-16 02:27:39 -0600

gvdhoorn gravatar image

updated 2023-01-16 02:38:37 -0600

First: even if you'd do this, I'm not sure how useful this would be.

Without a corresponding snapshot of the rest of the packages (and perhaps even rosdistro/rosdep DB), you cannot really install any additional packages without running the risk of introducing ABI incompatibilities. All newer packages would be fetched from the current Rolling repositories, which would not have any older versions available. And IIRC, the snapshot repository does not serve Rolling binaries (edit: see this comment by @nuclearsandwich on ROS Discourse fi).

Having written that: you can do this by specifying the "repo digest" of an image, instead of just a tag (which is what ros:rolling is), similar to how you'd "go back in history" in a Git repository.

As an example: a06562802dbaf8db525a63218bd1a75f1ac4dd43f82c9c7891678c307b2a2ecf is the hash of osrf/ros:noetic-desktop at around September last year. You can still fetch that image using:

docker pull osrf/ros@sha256:a06562802dbaf8db525a63218bd1a75f1ac4dd43f82c9c7891678c307b2a2ecf

Note: this is not the hash shown in the IMAGE ID column when you run docker images.

The tricky part would be finding the hash of that "older version of the ros::rolling docker image".

If you still have a machine around which has the older version -- or had, and ran a docker pull ros:rolling updating it -- you could use docker inspect <IMAGE_ID> to inspect it. Look for RepoDigests (or run docker inspect <IMAGE_ID> | jq -r '.[].RepoDigests').

If you don't, you'd normally be out of luck I believe -- AFAIK, there is no API to get Dockerhub to list historical digests -- but apparently docker-library/repo-info keeps track of updates to Dockerhub (for official images). For ros:rolling, you'd have to check ros/remote/rolling.md (note: not a perma-link on purpose). To get historical hashes see the commit history of that file. Here's the one for November 3, 2022 for instance. docker pull ros@sha256:52e537f081689f869e17eba032a5823026460f47629f95bc67e21a5e56c2efc9 should get you ros:rolling as it was around that time.

My Dockerfile starts with this:

FROM ros:rolling  # Would like to roll this back one version

Use the same notation in Dockerfiles:

FROM ros@sha256:52e537f081689f869e17eba032a5823026460f47629f95bc67e21a5e56c2efc9

this would build an image based on ros:rolling from around the 3rd of November 2022.

edit flag offensive delete link more

Comments

Confirmed you can cache these images yourself, but just like the snapshots discussion linked above, rolling is a moving target and there's no supported ways to get older versions. This is the point of rolling there's one version that we're all working on and we don't "support" older versions. That's the entire purpose of the distros to provide a stable target to develop against.

tfoote gravatar image tfoote  ( 2023-01-17 15:15:22 -0600 )edit

Thanks for the advice. I'll do the common-sense thing and try to switch to Humble.

AndyZe gravatar image AndyZe  ( 2023-01-24 07:56:00 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2023-01-15 17:10:46 -0600

Seen: 358 times

Last updated: Jan 16 '23