Question Details

No question body available.

Tags

azure azure-container-registry azure-container-apps identity-management

Answers (3)

Accepted Answer Available
Accepted Answer
April 1, 2025 Score: 1 Rep: 405 Quality: High Completeness: 60%

Initially, I kept the Docker image in the Azure Container Registry. I then created a user-assigned managed identity and assigned the Acr Pull role in the Azure Container Registry by navigating to IAM, clicking 'Add Role Assignment', selecting the user-assigned managed identity, and saved.

enter image description here

I have not enabled the admin user under Access Keys in Azure Container Registry. enter image description here

After that, I opened my existing container app, navigated to Settings, selected Identity, and added the user-managed identity that I created. enter image description here

After that, I selected Containers for the container app under Application. In Properties, I set the Image Source to Azure Container Registry and selected Managed Identity. Then, I provided the image name, registry, and image tag enter image description here

enter image description here

November 4, 2025 Score: 1 Rep: 71,522 Quality: Medium Completeness: 60%

I also had the error Container pull image failed with reason: ImagePullFailure

Platform logs:

2025-11-03T15:17:32.1131640Z Site container: company-product-devmanagedIdentity terminated during site startup. 
2025-11-03T15:17:32.1220106Z ManagedIdentity container failed to startup 
2025-11-03T15:17:43.3634933Z Container start method called. 
2025-11-03T15:17:43.3724850Z Establishing network. 
2025-11-03T15:17:43.4028337Z Pulling image: company.azurecr.io/company/product:latest. 
2025-11-03T15:17:45.4978723Z Container pull image failed with reason: ImagePullFailure. Revert by terminate. 
2025-11-03T15:17:45.4984690Z Container is terminating. Grace period: 5 seconds. 
2025-11-03T15:17:45.4991061Z Container spec TerminationMessagePolicy path 
2025-11-03T15:17:45.5062463Z Container is terminated. Total time elapsed: 0 ms. 
2025-11-03T15:17:45.5065883Z Site container: company-product-devmain terminated during site startup. 
2025-11-03T15:17:45.5177746Z Failed to start site. Revert by stopping site. 
2025-11-03T15:17:45.5192596Z Site: company-product-dev stopped.

It turned out to be a docker build error. The image was built using Apple Silicon and therefore defaulted to linux/arm64. Azure expects linux/amd64.

If anyone else has the same problem then run this command to verify.

docker buildx imagetools inspect company.azurecr.io/company/product:latest

Should say linux/amd64

I hope Azure will have a better error description than the generic ImagePullFailure in the future.

April 1, 2025 Score: 0 Rep: 1,719 Quality: Low Completeness: 50%
  1. Admin user be checked, and then you can use azure container registry using docker login. I think this is mandatory when using simple docker login to pull image.

  2. I have just test using Managed identity, and have the same role as yours, and works well.

enter image description here