STEP 1: Login & Create a Resource Group
az login
az group create --name devops-rg --location canadacentral
Register the Container Registry provider (Optional)
az provider register --namespace Microsoft.ContainerRegistry
az provider register --namespace Microsoft.Insights
Check registration status
az provider show --namespace Microsoft.ContainerRegistry --query "registrationState"
STEP 2: Create Azure Container Registry (ACR names must be globally unique)
az acr login --name osatuyiacr001
STEP 3: Tag a Local Image for ACR
docker pull Shakol090/docker-lab:2.0
docker tag shakol090/docker-lab:1.0 osatuyiacr001.azurecr.io/docker-lab:v2
STEP 4: Push the Image to ACR
docker push osatuyiacr001.azurecr.io/docker-lab:v2
Verify the Image Exists (Optional)
az acr repository list --name osatuyiacr001 --output table
Expected output:
Result
docker-lab

Top comments (0)