'How to list repositories/catalog in IBM Container Registery?
I am using IBM Container Registry and trying to list the repositories/catalog using the below command.
curl -i https://us.icr.io/v2/_catalog
HTTP/2 401
content-type: application/json; charset=utf-8
www-authenticate: Bearer realm="https://us.icr.io/oauth/token",service="registry",scope="registry:catalog:*",error="invalid_token"
The www-authenticate field state that the scope of the token should be registry:catalog:*.
When I tried to create a token with this scope, the generated token provides an empty access list.
Running the command with above generated access token gives the below error:
curl -i -H "Authorization: Bearer $token" https://us.icr.io/v2/_catalog
HTTP/2 403
content-type: application/json; charset=utf-8
www-authenticate: Bearer realm="https://us.icr.io/oauth/token",service="registry",scope="registry:catalog:*",error="insufficient_scope"
date: Mon, 23 May 2022 16:53:38 GMT
content-length: 134
cache-control: no-cache, no-store, must-revalidate
content-security-policy: default-src 'self'; frame-ancestors 'none'; form-action 'none';
docker-distribution-api-version: registry/2.0
expires: 0
pragma: no-cache
strict-transport-security: max-age=31536000; includeSubDomains
x-content-type-options: nosniff
x-frame-options: DENY
x-registry-supports-signatures: 1
x-xss-protection: 1; mode=block
server: IBM Cloud Container Registry
{"errors":[{"code":"DENIED","message":"insufficient scope","detail":[{"Type":"registry","Class":"","Name":"catalog","Action":"*"}]}]}
Does IBM Container Registry support _catalog docker v2 api?
Are there any other way to list the repositories?
Note: I have tried https://cloud.ibm.com/apidocs/container-registry#list-images, it lists all the images but not the repositories like _catalog docker v2 api.
Solution 1:[1]
According to the IBM Cloud Container Registry documentation and the experience you made, that API is not supported.
IBM Cloud Container Registry supports Docker Engine v17.07, or later.
Docker itself defines the Engine API, Hub API and the Registry API. The latter has the function you asked for.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | data_henrik |
