How to Build and push Container Image in Azure Container Registry from Azure CLI.

Olle Carlberg 40 Reputation points
2024-07-28T13:28:10.5+00:00

https://learn.microsoft.com/en-us/training/modules/publish-container-image-to-azure-container-registry/6-build-run-image-azure-container-registry

In this Exercise it asks me to Build and push image from a Dockerfile.

When I run this which is the second step to the exercise linked above:

az acr build --image sample/hello-world:v1 \ --registry <myContainerRegistry> \ --file Dockerfile .

I get this error in the Azure CLI (Bash):

(TasksOperationsNotAllowed) ACR Tasks requests for the registry <myRegistryName> and 1234hu-k12j3rm-jh<sefu-jhwekfjh are not permitted. Please file an Azure support request at http://aka.ms/azuresupport for assistance.

Code: TasksOperationsNotAllowed

Message: ACR Tasks requests for the registry carlbergsacr and d15a8485-838e-44be-a728-47df960eab1e are not permitted. Please file an Azure support request at http://aka.ms/azuresupport for assistance.

Target: request

I'm only following the "tutorial" I did echo inside the the Azure CLI and then tried building and pushing the image from there as well. I am running a free subscription which is a prerequisite but I am afraid I might need a "pay-as-you-go" subscription.

Thanks!

This question is related to the following Learning Module

Azure Container Registry
Azure Container Registry
An Azure service that provides a registry of Docker and Open Container Initiative images.
460 questions
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,672 questions
0 comments No comments
{count} votes

Accepted answer
  1. Srinud 2,425 Reputation points Microsoft Vendor
    2024-07-29T10:07:25.8966667+00:00

    Hi Olle Carlberg,

    Thank you for reaching out to us on the Microsoft Q&A forum.

    Based on the query provided, we understood that requests for ACR Tasks pertaining to the container registry and specific subscription IDs are currently not permitted.

    Please note that if you are utilizing an Azure free trial subscription, we recommend transitioning to a pay-as-you-go model. ACR is temporarily suspending ACR task runs funded by Azure free credits.

    We have conducted tests on our end and have successfully executed the "az acr build" command within a pay-as-you-go subscription. Attached below are the screenshots for your reference.

    User's image

    User's image

    If the information provided has been helpful to you then please accept the answer by clicking the Accept Answer & Upvote on the post. We value your feedback, and it will help us to assist others who might have a similar query.

    1 person found this answer helpful.

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.