Default Container Registry

Storing container images locally.

The Default container registry is a container registry flavor that comes built-in with ZenML and allows container registry URIs of any format.

When to use it

You should use the Default container registry if you want to use a local container registry or when using a remote container registry that is not covered by other container registry flavors.

Local registry URI format

To specify a URI for a local container registry, use the following format:


# Examples:

How to use it

To use the Default container registry, we need:

  • Docker installed and running.

  • The registry URI. If you're using a local container registry, check out

  • the previous section on the URI format.

We can then register the container registry and use it in our active stack:

zenml container-registry register <NAME> \
    --flavor=default \

# Add the container registry to the active stack
zenml stack update -c <NAME>

You may also need to set up authentication required to log in to the container registry.

Authentication Methods

If you are using a private container registry, you will need to configure some form of authentication to login to the registry. If you're looking for a quick way to get started locally, you can use the Local Authentication method. However, the recommended way to authenticate to a remote private container registry is through a Docker Service Connector.

If your target private container registry comes from a cloud provider like AWS, GCP or Azure, you should use the container registry flavor targeted at that cloud provider. For example, if you're using AWS, you should use the AWS Container Registry flavor. These cloud provider flavors also use specialized cloud provider Service Connectors to authenticate to the container registry.

This method uses the Docker client authentication available in the environment where the ZenML code is running. On your local machine, this is the quickest way to configure a Default Container Registry. You don't need to supply credentials explicitly when you register the Default Container Registry, as it leverages the local credentials and configuration that the Docker client stores on your local machine.

To log in to the container registry so Docker can pull and push images, you'll need to run the docker login command and supply your credentials, e.g.:

docker login --username <USERNAME> --password-stdin <REGISTRY_URI>

Stacks using the Default Container Registry set up with local authentication are not portable across environments. To make ZenML pipelines fully portable, it is recommended to use a Docker Service Connector to link your Default Container Registry to the remote private container registry.

For more information and a full list of configurable attributes of the Default container registry, check out the SDK Docs .

Last updated