 register the Azure Container Registry as follows:# Register the Azure container registry and reference the target ACR registry URI

zenml container-registry register <CONTAINER_REGISTRY_NAME> -f azure \

--uri=<REGISTRY_URL>

# Connect the Azure container registry to the target ACR registry via an Azure Service Connector

zenml container-registry connect <CONTAINER_REGISTRY_NAME> -i

A non-interactive version that connects the Azure Container Registry to a target ACR registry through an Azure Service Connector:

zenml container-registry connect <CONTAINER_REGISTRY_NAME> --connector <CONNECTOR_ID>

Example Command Output

$ zenml container-registry connect azure-demo --connector azure-demo

Successfully connected container registry `azure-demo` to the following resources:

┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓

┃             CONNECTOR ID             │ CONNECTOR NAME │ CONNECTOR TYPE │ RESOURCE TYPE      │ RESOURCE NAMES                        ┃

┠──────────────────────────────────────┼────────────────┼────────────────┼────────────────────┼───────────────────────────────────────┨

┃ db5821d0-a658-4504-ae96-04c3302d8f85 │ azure-demo     │ 🇦  azure       │ 🐳 docker-registry │ demozenmlcontainerregistry.azurecr.io ┃

┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

As a final step, you can use the Azure Container Registry in a ZenML Stack:

# Register and set a stack with the new container registry

zenml stack register <STACK_NAME> -c <CONTAINER_REGISTRY_NAME> ... --set

Linking the Azure Container Registry to a Service Connector means that your local Docker client is no longer authenticated to access the remote registry. If you need to manually interact with the remote registry via the Docker CLI, you can use the local login Service Connector feature to temporarily authenticate your local Docker client to the remote registry: