Ghcr.io docker HTTP API

Hi,

Does the GitHub container registry (ghcr.io) support the docker V2 HTTP API’s?

Specifically, does it support listing repositories and tags (https://docs.docker.com/registry/spec/api/#listing-repositories)?

1 Like

I guess the answer is “yes”. I’m assuming this from:

I can list the tags of a ghcr.io repo with skopeo:

docker run --rm quay.io/skopeo/stable list-tags docker://ghcr.io/my-github-user/hello-world
{
    "Repository": "ghcr.io/my-github-user/hello-world",
    "Tags": [
        "latest"
    ]
}

and when I run it with --debug there are clues that it’s indeed using the v2 endpoint:

level=debug msg="GET https://ghcr.io/v2/my-github-user/hello-world/manifests/latest"

/v2/_catalog support is in our backlog! It hasn’t arrived yet but we know we need it.

2 Likes

Thanks for the confirmation.

For context (and just in case it helps nudge it up the priority list), we make Octopus Deploy, and when integrating with container registries we use the HTTP catalog API to list the available repositories and tags in the UI.

1 Like

Thanks for that context! It does help.

Are there any other features / APIs that would be useful?

I know I am not the OP but here is what the DockerHub API provides now and it would be useful to have parity.

https://hub.docker.com/v2/repositories/jgamblin/tiny-tor/

I guess it will be much more easy to publish graphql v4 api to list all repositories in registry related to user or organization than enabling /_catalog api which list basically all images. But both can do the job here.

It would be really useful to modify README and package descriptions through API. Not every package could be linked to single GitHub repository, or the repository might have multiple packages.

Also, if the implementation of repository listing shows last modified time or Manifest hash, that would be neat - based on the list I could see which packages have changed since querying API last time.