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

scjody picture scjody · Dec 5, 2017 · Viewed 10.9k times · Source

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).

Answer

Chris Stryczynski picture Chris Stryczynski · Feb 12, 2018

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