Pin an image version but which version info to use?

I have successfully installed NextCloud and mariadb using docker-compose and I have used the following image specifications in my docker-compose.yml file:

image: linuxserver/mariadb:arm64v8-latest

image: nextcloud

However, I’d like to pin the versions of both images to the minor versions that are currently running on my system. I am wondering how to determine the version info of the images running on my system? For example, I can investigate the running containers by use of portainer and it displays:

NEXTCLOUD_VERSION 24.0.5
build_version Linuxserver.io version:- 10.5.17-r0-ls70

In other words: it is not obvious to me how to specify version informations to be used in the image statement of the docker-compose file?

To pin the database version, is it:
linuxserver/mariadb:arm64v8-10.5 ?

To pin the NextCloud version, is it:

image: nextcloud:24.0 ?

You can always open the ‘tags’ tab of the dockerhub repo and filter for the version you used, then copy it’s digest, remove the filter and search for the digest - You will see which tags actually point to that exact version of the image.

Thank you very much for pointing this out. OK, I have searched for my image, for example “linuxserver/mariadb” and have chosen the Tags tab. Then I have identified my OS/ARCH, e.g. linux/arm64/v8. In this example, the DIGEST is 852e5cee9eb2. Filtering for this DIGEST info, however, does not provide any results.
So it is still unclear to me how to specify the (minor) version info of this image in docker-compose. Would it be
linuxserver/mariadb:852e5cee9eb2 ?

Hmm, are you looking for a specific fixed tag or are you looking for the exact image by its sha256 digest?

My understanding was that you are looking for a specific tag. So in case of mariadb it seems there is no tag that just pins the architecture and major.minor version. You best bet is to use the label that is major.minor.patch.

I mentioned the digest, as it is a way to identify which tags point to an image version, but I didn’t suggest using the digest as tag. The digest was supposed to be used to find tags that point to the image to identify a tag that has the semantics you are looking for.

I am not looking for the exact image by its sha256 digest but just the major.minor version of the image. This is to avoid version conflicts when pulling new images by use of docker-compose.

I think this is what is referred to in a docker-compose.yml by the statement:

services:

db_nextcloud:
container_name: db_nextcloud
image: :<major.minor.patch>

but what do I have to insert in the case of
image: linuxserver/mariadb:arm64v8-latest

instead of arm64v8-latest to pin the image to a minor version when pulling with docker-compose?

What I did:

  1. filter tags by the tag you provided to get the digest:

  2. remove tag filter and user browser text search for the digest:

Multi arch tag:

Specific arch tag:

Still, there is no major.minor tag for this image. It is a design choice of the image maintainer if they want to provide tags for semanitic version and what type they support. This is nothing docker or dockerhub does.

Thank you very much, this worked for me, that is, I have used the tag arm64v8-version-10.5.17-r0 to pin the container version of my database.