Problem#
The OCI Distribution Spec defines a GET /v2/_catalog endpoint that lists all repositories in the registry. This endpoint is not implemented in grain. Tools like crane catalog, skopeo, and some CI systems expect this endpoint to exist.
Proposed Solution#
- Add a
GET /v2/_catalogroute - Scan the
./tmp/manifestsdirectory structure to enumerate{org}/{repo}pairs - Require authentication (at minimum read permission)
- Support pagination via
nandlastquery parameters per the spec - Return
{"repositories": ["org/repo1", "org/repo2"]}format
Considerations#
- Should respect per-user permissions (only list repos the authenticated user can read)
- Could be expensive on large registries; consider caching