DeploymentFailed - InaccessibleImage error code
This article discusses how to resolve a deployment failure on Microsoft Azure Container Instances that generates an "InaccessibleImage" error code.
Symptoms
When you try to deploy a container instance, the deployment fails, and you receive an error message that resembles the following text:
{
"code":"DeploymentFailed",
"message":"At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/DeployOperations for usage details.",
"details":[{
"code":"InaccessibleImage",
"message":"The image '<container-registry-name>.azurecr.io/<image-name>:<version-name>' in container group '<container-group-name>' is not accessible. Please check the image and registry credential."}
]
}
Cause
You're trying to use a service principal to access the Azure container registry. This scenario can occur because of one of the following reasons:
You specified incorrect credentials when you tried to create the container instance.
You specified the correct credentials, but the service calls on Container Instances are blocked by firewall rules in the Azure container registry.
Solution
You must use a managed identity to allow the Container Instances trusted service to access the container registry. For more information, see Allow trusted services to securely access a network-restricted container registry. You can also learn more at Deploy to Azure Container Instances from Azure Container Registry using a managed identity.
References
Contact us for help
If you have questions or need help, create a support request, or ask Azure community support. You can also submit product feedback to Azure feedback community.