An Azure service that provides a registry of Docker and Open Container Initiative images.
The error indicates that ACR Tasks operations are blocked for this registry, so az acr build cannot run.
az acr build is implemented as an ACR Task “quick task” that runs the Docker build in Azure. When Tasks are not permitted for a registry, any az acr build or az acr pack build invocation fails before the actual build starts, exactly as shown in the log (context upload succeeds, then the service rejects the task request).
Because the registry is refusing all ACR Tasks requests, there is no client-side fix in the CLI or command syntax. The only supported resolution is to have the restriction on ACR Tasks removed for that registry by Azure support.
Practical options:
- Open an Azure support request for this specific registry ID and error code so that ACR Tasks can be enabled for it, as the error message instructs.
- As a temporary workaround while waiting for support, build and push images using a local Docker engine instead of ACR Tasks:
- Use
docker build -t <registry-name>.azurecr.io/<image>:<tag> . - Then
docker push <registry-name>.azurecr.io/<image>:<tag>
- Use
Once ACR Tasks are permitted again, the same az acr build command will work and behave as described in the ACR quick tasks and tutorials.
References:
- Automate container image builds and maintenance with Azure Container Registry tasks
- Tutorial: Build and deploy container images in the cloud with Azure Container Registry Tasks
- Tutorial: Automate container image builds when a base image is updated in an Azure container registry
- Tutorial - Create an Azure Container Registry (ACR) and build images
- Run multi-step build, test, and patch tasks in ACR Tasks
- Build and push an image from an app using a Cloud Native Buildpack
- ACR Tasks reference: YAML