Contribute a Registry Provider - ravipal/vscode-docker GitHub Wiki

Connect a Generic Docker Registry

First, try connecting your registry as a "Generic Docker Registry". Many registries will work with our existing implementation of the Docker V2 API and do not require any additional contributions.

This feature has the following limitations:

  1. You must connect a single registry at a time
  2. It currently only supports basic authentication. Token authentication has not been implemented yet, but is tracked in #869 and documented here. Contributions are welcome!
  3. You must connect a private registry. It won't work for central registries like Docker Hub or GitLab that host repositories for many users under unique namespaces.

Contribute a Registry Provider

If the "Generic Docker Registry" support is not sufficient, follow these steps to contribute a new provider:

  1. Determine registry API: For example, GitLab exposes a public API other than the default Docker API. This api will be used to list repositories and tags.
  2. Determine registry Authentication: For example, GitLab details authenticating requests using OAuth.
  3. Get Started: Follow the steps in the contributing section to clone and start working in our repo.
  4. Implement: Add at least the following code:
    1. Add an entry for your api in src/tree/registries/all/RegistryApi.ts (unless your provider leverages an existing API)
    2. Add a new folder in src/tree/registries for your provider
    3. Create an IRegistryProvider in your new folder, implementing all required fields, and add it to the list in src/tree/registries/all/getRegistryProviders.ts
  5. Submit a PR!