io      ┃

┗━━━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━┛If you already have one or more Docker Service Connectors configured in your ZenML deployment, you can check which of them can be used to access the container registry you want to use for your Default Container Registry by running e.g.:

zenml service-connector list-resources --connector-type docker --resource-id <REGISTRY_URI>

Example Command Output

$ zenml service-connector list-resources --connector-type docker --resource-id docker.io

The  resource with name 'docker.io' can be accessed by 'docker' service connectors configured in your workspace:

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

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

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

┃ cf55339f-dbc8-4ee6-862e-c25aff411292 │ dockerhub      │ 🐳 docker      │ 🐳 docker-registry │ docker.io      ┃

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

After having set up or decided on a Docker Service Connector to use to connect to the target container registry, you can register the Docker Container Registry as follows:

# Register the container registry and reference the target registry URI

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

--uri=<REGISTRY_URL>

# Connect the container registry to the target registry via a Docker Service Connector

zenml container-registry connect <CONTAINER_REGISTRY_NAME> -i

A non-interactive version that connects the Default Container Registry to a target registry through a Docker Service Connector:

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

Example Command Output

$ zenml container-registry connect dockerhub --connector dockerhub