Search code examples
docker

How do I pin the version I use of the official opensearch docker image?


Currently, I'm using the latest tag, which works well. However, I want to pin the version I use in my systems, so I don't unexpectedly download an update.

I tried using the tag 2.9.0, but it doesn't work for me and it indeed looks like it's an older version. So how can I pin the latest version and avoid using dynamic tags.

https://hub.docker.com/r/opensearchproject/opensearch/tags?page=&page_size=&name=&ordering=name


Solution

  • It looks like they haven't published a version-tagged image for over a year.

    You can pin to the image you're currently using by utilizing the image digest, which you can find on the page to which you've linked in your question. Look at the "Digest" links under the latest tag:

    enter image description here

    Click on the digest for whichever image is appropriate to your architecture, and on the following page you'll see the complete digest:

    enter image description here

    Copy the digest and use it in your image reference like this:

    opensearchproject/opensearch@sha256:36b60c4692d504ace282028659316b245ed6f53145330313ce8e6a44da4c447c