2

While trying to query my GCR container registry using the _catalog API with a pagination parameter I observed that there is no pagination mechanism as descriped in Docker's documentation.

$ TOKEN=$(gcloud auth print-access-token)
$ curl -v -u _token:${TOKEN} -X GET "https://gcr.io/v2/_catalog?n=1"

I see that you get all the repositories at once. I would expect to get a single repository instead. Here is the response's body:

{"repositories":["image1","image2","image3", ... , "image2016"]}

The response's headers has no information regards the way GCR processed the request, namely the following query returns the same result as the above:

curl -v -u _token:${TOKEN} -X GET "https://gcr.io/v2/_catalog"

Google says it supports all the V2 docker registry API.

0x90
  • 39,472
  • 36
  • 165
  • 245
  • Seems google doesn't do pagination at all, I pushed more than 200 images and a single curl brought them all. `curl -v -u _token:${TOKEN} -X GET "https://gcr.io/v2/_catalog"` – 0x90 Jul 12 '16 at 10:33
  • AFAIK google will add the pagination support soon. – 0x90 Jul 27 '16 at 16:31

0 Answers0