GitHub Container Registry
How to store container images in GitHub
The GitHub container registry is a container registry flavor which comes built-in with ZenML and uses the GitHub Container Registry to store container images.

When to use it

You should use the GitHub container registry if:
  • one or more components of your stack need to pull or push container images.
  • you're using GitHub for your projects. If you're not using GitHub, take a look at the other container registry flavors.

How to deploy it

The GitHub container registry is enabled by default when you create a GitHub account.

How to find the registry URI

The GitHub container registry URI should have the following format:
ghcr.io/<USER_OR_ORGANIZATION_NAME>
# Examples:
ghcr.io/zenml
ghcr.io/my-username
ghcr.io/my-organization
To figure our the URI for your registry:
  • Use the GitHub user or organization name to fill the template ghcr.io/<USER_OR_ORGANIZATION_NAME> and get your URI.

How to use it

To use the GitHub container registry, we need:
  • Docker installed and running.
  • The registry URI. Check out the previous section on the URI format and how to get the URI for your registry.
  • Our Docker client configured so it can pull and push images. Follow this guide to create a personal access token and login to the container registry.
We can then register the container registry and use it in our active stack:
zenml container-registry register <NAME> \
--flavor=github \
--uri=<REGISTRY_URI>
# Add the container registry to the active stack
zenml stack update -c <NAME>
For more information and a full list of configurable attributes of the GitHub container registry, check out the API Docs.