Regctl provides - among other things - a CLI for listing image tags available on a registry, but when the image has a lot of tags, pagination gets in the way.
The problem is that so far I've not found a way to obtain other than the 1st 50 tags on quay.io. i.e. if I get tags for calico/node image from dockerhub I get
/tmp$ regctl tag ls calico/node | wc -l
8225
but when it comes to quay.io it seems to return just the first 50 tags, that is why regctl provides a specific flag (from regctl tag ls --help
)
--last string Specify the last tag from a previous request for pagination
but the --last param seems not working on quay as regctl seems to return the very same contents as when invoked without the flag
/tmp$ regctl tag ls quay.io/calico/node | wc -l
50
/tmp$ regctl tag ls quay.io/calico/node | tail -n 3
v3.4.0-0.dev-27-g319e739-ppc64le
v3.4.0-0.dev-28-g909229b-amd64
v3.4.0-0.dev-28-g909229b-arm64
/tmp$ regctl tag ls quay.io/calico/node --last 'v3.4.0-0.dev-28-g909229b-arm64' | tail -n 3
v3.4.0-0.dev-27-g319e739-ppc64le
v3.4.0-0.dev-28-g909229b-amd64
v3.4.0-0.dev-28-g909229b-arm64
The parameter is working, but only kinda:
Something that jumps out there is that the last tag is included in the new list, which isn't valid from the OCI spec. Instead, the results should look like what Hub does:
I've also noticed when I increase the limit, I'll start seeing entries returned from even further before the "last" entry that I requested, and it's using a previous "last" parameter for these offsets. Most likely it's some weird caching happening, which is documented in this Jira issue. For right now, it appears that Quay is not following the OCI distribution-spec which makes this difficult to test and use, and will need to be fixed by Quay.