nectors 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.

To set up the Default Container Registry to authenticate to and access a private container registry, it is recommended to leverage the features provided by the Docker Service Connector such as local login and reusing the same credentials across multiple stack components.

If you don't already have a Docker Service Connector configured in your ZenML deployment, you can register one using the interactive CLI command:

zenml service-connector register --type docker -i

A non-interactive CLI example is:

zenml service-connector register <CONNECTOR_NAME> --type docker --username=<USERNAME> --password=<PASSWORD_OR_TOKEN>

Example Command Output

$ zenml service-connector register dockerhub --type docker --username=username --password=password

Successfully registered service connector `dockerhub` with access to the following resources:

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

┃   RESOURCE TYPE    │ RESOURCE NAMES ┃

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

┃ 🐳 docker-registry │ docker.io      ┃

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