Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Docker Hub: How do I pull an older version of a 3rd party image?

How do I pull an older build of a 3rd party image from Docker Hub?

For example I would like to pull this build of appropriate/curl.

I've tried using the "Build Code" as the tag, as well as the partial SHA256 of the image shown at the end of the build, and neither work.

Note: this is different from Docker: How do I pull a specific build-id? since the author of that question is able to fork the version and tag their own builds as a workaround. I'm trying to access something that was built in the past (to analyze a regression).

like image 209
scjody Avatar asked Dec 05 '17 18:12

scjody


People also ask

How do I pull an image from Docker Hub?

Most of your images will be created on top of a base image from the Docker Hub registry. Docker Hub contains many pre-built images that you can pull and try without needing to define and configure your own. To download a particular image, or set of images (i.e., a repository), use docker pull .

How do I push an existing image to Docker Hub?

To push an image to Docker Hub, you must first name your local image using your Docker Hub username and the repository name that you created through Docker Hub on the web. You can add multiple images to a repository by adding a specific :<tag> to them (for example docs/base:testing ).


3 Answers

You need the digest ID.

For example:

docker pull postgres@sha256:500edc08fa825dbf3f28dceced99fe84b8a4211d7a45fc0062250d4efb0f64c5

Some of the projects may have additional history available to retrieve an old digest id. For example these projects: https://github.com/docker-library/repo-info/tree/master/repos

like image 167
Chris Stryczynski Avatar answered Oct 13 '22 09:10

Chris Stryczynski


You can use the digest ID only if the image doesn't have a tag. FROM is either FROM image:tag or FROM image:hash. This is just really bad when you want to pull debian:jessie@c856411d1c21111855a54c5d29f2bfe099d63ce7

like image 30
gazorpazorp Avatar answered Oct 13 '22 09:10

gazorpazorp


I am afraid it's not possible. Build Details tab shows no tags other than latest and edge, which were overwritten each time a build was made.

Try to contact the image contributor. This is his github profile, where you can find his email address: https://github.com/md5

He might provide you a previous version taken from some of his old commits.

like image 2
Sergei Krivosheenko Avatar answered Oct 13 '22 07:10

Sergei Krivosheenko