I would like to find out the latest timestamp for an image in a private Docker registry using the v2 API without first pulling the image to my local host.
So after some hacking around, I got the following to work using the curl
and jq
tools:
curl -X GET http://registry:5000/v2/<IMAGE>/manifests/<TAG> \
| jq -r '.history[].v1Compatibility' \
| jq '.created' \
| sort \
| tail -n1
This seems to work but I don't really know how the v1 Compatibility representation is to be interpreted so I don't know if I am really getting the correct number out of this.
Comments on this are welcome!