Azure Container Registry

Storing container images in Azure.

The Azure container registry is a container registry flavor that comes built-in with ZenML and uses the Azure Container Registryarrow-up-right to store container images.

When to use it

You should use the Azure container registry if:

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

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

How to deploy it

circle-info

Would you like to skip ahead and deploy a full ZenML cloud stack already, including an Azure container registry? Check out thein-browser stack deployment wizardarrow-up-right, the stack registration wizardarrow-up-right, or the ZenML Azure Terraform modulearrow-up-right for a shortcut on how to deploy & register this stack component.

Go herearrow-up-right and choose a subscription, resource group, location, and registry name. Then click on Review + Create and to create your container registry.

How to find the registry URI

The Azure container registry URI should have the following format:

<REGISTRY_NAME>.azurecr.io
# Examples:
zenmlregistry.azurecr.io
myregistry.azurecr.io

To figure out the URI for your registry:

  • In the search bar, enter container registries and select the container registry you want to use. If you don't have any container registries yet, check out the deployment section on how to create one.

  • Use the name of your registry to fill the template <REGISTRY_NAME>.azurecr.io and get your URI.

How to use it

To use the Azure container registry, we need:

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

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

Authentication Methods

Integrating and using an Azure Container Registry in your pipelines is not possible without employing some form of authentication. 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 the Azure cloud platform is through an Azure Service Connectorarrow-up-right. This is particularly useful if you are configuring ZenML stacks that combine the Azure Container Registry with other remote stack components also running in Azure.

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 an Azure Container Registry. You don't need to supply credentials explicitly when you register the Azure Container Registry, as it leverages the local credentials and configuration that the Azure CLI and Docker client store on your local machine. However, you will need to install and set up the Azure CLI on your machine as a prerequisite, as covered in the Azure CLI documentationarrow-up-right, before you register the Azure Container Registry.

With the Azure CLI installed and set up with credentials, you need to login to the container registry so Docker can pull and push images:

circle-exclamation

For more information and a full list of configurable attributes of the Azure container registry, check out the SDK Docsarrow-up-right .

ZenML Scarf

Last updated

Was this helpful?