List image tags with date created in Private Docker Registry V2

511 Views Asked by At

I am trying to list all the images in our private V2 docker registry. I was looking for a way, in which I could list images' tags and their creation date as well.

One of the way to list the tags of an image is:

curl -X GET https://DOC-REG-URL.com/v2/REPO_NAME/IMAGE_NAME/tags/list

But, it doesn't list date info.

Is there a way to achieve this?

Thanks in advance.

1

There are 1 best solutions below

0
On

The build date is often included inside the image config. So to implement this you would need to:

  1. List every tag
  2. Pull the manifest for those tags, this may require resolving the platform from a manifest list
  3. Pull the config blob and parse the date from the json