skip to Main Content

Have a question on Azure need to deploy an azure container app by pulling the image from azure container registry from AZ

Steps:

1- az login -successful
2- az acr login appdev - successful
3- az containerapp create --name apptest --resource-group 
testapp --image appdev.azurecr.io/dev/dev-app:latest 
--environment MyContainerappEnv 

Throwing this error:

the following field(s) are either invalid or missing. Invalid value: "appdev.azurecr.io/dev/dev-app:latest": GET https:?scope=repository%3Adev%2Fdev-app%3Apull&service=appdev.azurecr.io: UNAUTHORIZED: authentication required, visit https://aka.ms/acr/authorization for more information.: template.containers.apptest.image

I have already logged in successfully and able to pull the image using

docker pull appdev.azurecr.io/dev/dev-app:latest

Also this is successful

az acr login --name appdev
Login Succeeded

Able to push the image to ACR .
I already have contributor permission to the subscription.

Can anyone help? Thanks

2

Answers


  1. Chosen as BEST ANSWER

    this worked:

    az containerapp create --name apptest 
      --resource-group testapp 
      --image appdev.azurecr.io/dev/dev-app:latest 
      --environment MyContainerappEnv 
      --registry-server appdev.azurecr.io //adding this
    

    1. Go to
      your container registry => Access token => set admin user to "enabled"
    2. You should add a commend below during creating az containerapp using Azure CLI.:

    --registry-server appdev.azurecr.io

    Azure Container Registry:

    `az acr create –resource-group $RESOURCE_GROUP –name $ACR_NAME –sku Basic ‘–admin-enabled true

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search