Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Azure Developer CLI (azd) supports external third-party container registries for deployment. To use this feature, you need to manually authenticate to the external container registry before calling azd deploy.
Authentication
Run docker login and authenticate to your external container registry. You may need to follow more setup or configuration steps for your specific registry provider.
docker login <your-registry>
Example scenarios
You can configure azd to push and pull images from an external container registry in the azure.yaml file of your template. Support for more container registries provides greater flexibility for your deployment workflows.
Pull from external container registry
In this example, during azd deploy the container is pulled from docker.io/username/nginx:latest and directly referenced by the container app service.
name: todo-nodejs-mongo-aca
metadata:
template: todo-nodejs-mongo-aca@0.0.1-beta
services:
nginx:
image: docker.io/<username>/nginx:latest
host: containerapp
Note
Your containerapp infra configuration must configure credentials when pulling containers from private container registries.
Pull, tag & push to external registry
Consider an azure.yaml file with the following configuration:
# azure.yaml
name: todo-nodejs-mongo-aca
metadata:
template: todo-nodejs-mongo-aca@0.0.1-beta
services:
nginx:
image: nginx
host: containerapp
docker:
registry: docker.io/<username>
image: nginx
tag: latest
The azd deploy command pulls the configured nginx image. In this case, it's a public image on docker hub, so azd retags the container/image and pushes it to the docker registry.
Build, tag & push to external registry on azd deploy
Consider an azure.yaml file with the following configuration:
# azure.yaml
name: todo-nodejs-mongo-aca
metadata:
template: todo-nodejs-mongo-aca@0.0.1-beta
services:
api:
project: ./src/api
host: containerapp
docker:
registry: docker.io/<username>
image: todo-api
The azd deploy command builds the container, tags it and pushes it to the docker registry.