Google Cloud Container Registry

Storing container images in GCP.

The GCP container registry is a container registry flavor that comes built-in with ZenML and uses the Google Artifact Registry.

Important Notice: Google Container Registry is being replaced by Artifact Registry. Please start using Artifact Registry for your containers. As per Google's documentation, "after May 15, 2024, Artifact Registry will host images for the gcr.io domain in Google Cloud projects without previous Container Registry usage. After March 18, 2025, Container Registry will be shut down." The terms container registry and artifact registry will be used interchangeably throughout this document.

When to use it

You should use the GCP container registry if:

one or more components of your stack need to pull or push container images.

you have access to GCP. If you're not using GCP, take a look at the other container registry flavors.

How to deploy it

The GCP container registry (and GCP integration in general) currently only works for Python versions <3.11. The ZenML team is aware of this dependency clash/issue and is working on a fix. For now, please use Python <3.11 together with the GCP integration.

When using the Google Artifact Registry, you need to:

enable it here

go here and create a Docker repository.

Infrastructure Deployment

A GCP Container Registry can be deployed directly from the ZenML CLI:

zenml container-registry deploy gcp_container_registry --flavor=gcp --provider=gcp ...

You can pass other configurations specific to the stack components as key-value arguments. If you don't provide a name, a random one is generated for you. For more information about how to work use the CLI for this, please refer to the dedicated documentation section.

How to find the registry URI

When using the Google Artifact Registry, the GCP container registry URI should have the following format:

<REGION>-docker.pkg.dev/<PROJECT_ID>/<REPOSITORY_NAME>

# Examples: