Login to Azure Container Registry on Linux

Before pushing and pulling container images, you need to sign into the container registry.

Requirements

  • Install AZ CLI on Linux
  • Install Docker Engine on Linux
  • The login server name for the target container registry

Process

Sign into Azure:

az login

You need to make sure you are working in the correct Azure subscription.

az account show
az account set --subscription [subscription_name]

(optional) Retrieve the login server name of your ACR or copy it direct from the Azure portal.

az acr list --resource-group [YourResourceGroupName] --query "[].{acrLoginServer:loginServer}" --output table

Using the ACR login server you can log into the container registry.

az acr login --name [acr_login_server]
Last modified July 21, 2024: update (e2ae86c)