"Exercise: Build and run a container image by using Azure Container Registry Tasks" fails with TasksOperationsNotAllowed

Leith McCombs 20 Reputation points Microsoft Employee
2024-06-13T18:31:42.68+00:00

In the training module https://learn.microsoft.com/en-us/training/modules/publish-container-image-to-azure-container-registry/6-build-run-image-azure-container-registry in the section "Build and push image from a Dockerfile", the second command fails with:
*(TasksOperationsNotAllowed) ACR Tasks requests for the registry

Azure Training
Azure Training
Azure: A cloud computing platform and infrastructure for building, deploying and managing applications and services through a worldwide network of Microsoft-managed datacenters.Training: Instruction to develop new skills.
1,712 questions
{count} votes

Accepted answer
  1. RDash 2,150 Reputation points Microsoft Vendor
    2024-07-19T09:23:41.0366667+00:00

    Hi Leith McCombs ,

    We apologize for any inconvenience you may have experienced issue while trying the exercise of Microsoft Learn path.

    When you use this command on Azure Cloud Shell:

    az acr build --registry $REGISTRYNAME --image expressimage you get an error:

    (TasksOperationsNotAllowed) ACR Tasks requests for the registry <containerRegistryName> and <password> are not permitted.

    Customer shared -

    Here are the few steps for using Docker CLI commands :

    1.I discovered a workaround using Docker CLI commands.

    2.Login to the ACR using az acr login -n $ACRNAME -p <password>

    Tag the image first- docker tag <image name>:latest <ACR registry name>.azurecr.io/<image name>

    3.Push the image to ACR from docker - docker push <ACR registry name>.azurecr.io/<image name>

    The images will now appear in your ACR - az acr repository list --name $ACRNAME --output table

    Here is the referral link: https://stackoverflow.com/questions/77982084/how-to-fix-tasksoperationsnotallowed-acr-tasks-requests-for-the-registry-cont#:~:text=The%20error%20message%20%22TasksOperationsNotAllowed%22%20occurs%20when%20ACR%20Tasks,has%20the%20required%20permissions%20to%20perform%20ACR%20tasks. Please let us know if they were helpful and don't hesitate to reach out to us if you face any issue.

    Thank you.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.