"statusMessage": "{\"status\":\"Failed\",\"error\":{\"code\":\"ResourceOperationFailure\",\"message\":\"The resource operation completed with terminal provisioning state 'Failed'.\",\"details\":[{\"message\":\"pulling image \\"AzureContainerRegistryDemo1.azurecr.io/samplewebappgirishtesting:acr\\";Failed to pull image \\"AzureContainerRegistryDemo1.azurecr.io/samplewebappgirishtesting:acr\\": rpc error: code Unknown desc Error response from daemon: Get https://AzureContainerRegistryDemo1.azurecr.io/v2/samplewebappgirishtesting/manifests/acr: unauthorized: authentication required;Back-off pulling image \\"AzureContainerRegistryDemo1.azurecr.io/samplewebappgirishtesting:acr\\"\"}]}}"
⚠Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
@girishgouda Thanks for your feedback! We will investigate and update as appropriate.
@girishgouda at what step in the doc are you getting this error exactly?
@girishgouda I will close for now. Let me know when ready and we can reopen and continue.
@MicahMcKittrick-MSFT
I'm getting the exact same error in stage "az container create", in the output log.
Location is westeurope
I have also tried to use registry password with no luck (same error).
az acr update --name $ACR_NAME --admin-enabled true
az container create
...
--registry-username $ACR_NAME
--registry-password $(az acr credential show --name $ACR_NAME --query "passwords[0].value")
...
So I guess it's not related to the SP but in authentication between ACI resource provider and ACR?
It was coming for az container create. Instead of closing the request can you look into this.
@girishgouda @maganvill thanks for the extra information. Apologies for the delay in response. I was out of office.
@dlepow I also get the same error. Can you take a look at the doc and see what we can do to make it work?
@girishgouda @maganvill - Thanks both for the feedback. I notice in Girish's case that the login server name AzureContainerRegistryDemo1.azurecr.io used to create the container contains uppercase letters. If you try the example using all lowercase for the login server name (azurecontainerregistrydemo1.azurecr.io), does it work? Generally the underlying docker commands expect all lowercase for the login server. (I realize that the script as written doesn't prevent you from using a mixed case registry name, and that name gets substituted directly to create the login server name, so we might need to update the script to prevent that.)
Also, did either of you (or @MicahMcKittrick-MSFT) try to use the portal procedure in that article to deploy the image from your registry to Azure Container Instances? When you use the portal, you are authenticated to the registry via your Azure identity, so you don't need to supply other registry credentials.
Thanks!
Switching to lower case worked for me!
I never realised that issue since AZ CLI in all other places where ACR is used, is user friendly and corrects the casing for me.
And yes, the portal procedure worked the whole time but was not an option for me.
Thanks
@maganvill - Glad to hear that changing the case of the login server worked. I will make a small update to the article to mention that and adjust the script so it must use lowercase for the login server name.
Updated article published. Thanks again @girishgouda and @maganvill