How to pull docker image from Azure Container Registry

Ha Doan
2 min readOct 14, 2023

0. Install Azure CLI

https://learn.microsoft.com/en-us/cli/azure/install-azure-cli

To pull a Docker image from the Azure Container Registry, you need to authenticate and use the docker pull command with the registry’s URL. Here are the steps to pull a Docker image from an Azure Container Registry:

  1. Authenticate to the Azure Container Registry:

Before you can pull images from the Azure Container Registry, you need to authenticate using the Azure CLI. Open your terminal and run the following command:

az acr login — name <registry-name>

Replace <registry-name> with the name of your Azure Container Registry.

2. Pull the Docker Image:

After you have successfully authenticated, you can use the docker pull command to pull an image from the Azure Container Registry. The syntax is as follows:

docker pull <registry-name>.azurecr.io/<image-name>:<tag>
  • <registry-name> is the name of your Azure Container Registry.
  • <image-name> is the name of the Docker image you want to pull.
  • <tag> is the version or tag of the image you want to pull (optional).
    For example:

docker pull myregistry.azurecr.io/myapp:v1

This command will pull the myapp image with tag v1 from the Azure Container Registry.

Authenticate with Docker (Optional):

If you prefer to use Docker commands to authenticate with your Azure Container Registry, you can use the following command:


docker login <registry-name>.azurecr.io

This will prompt you for your Azure Container Registry credentials.

By following these steps, you can pull Docker images from an Azure Container Registry to your local machine. Make sure you have the necessary permissions and authentication credentials to access the registry.

--

--