2
votes

I am currently trying to create a new container on Azure Container Instance, to deploy a .net core app image on it. (I'm a newbie on this techno).

I have created a Container Registry on Azure and pushed an image on it (.net fore Console Application).

I have tried to create a container from Azure Portal, but continuously get the same error:

"code": "InaccessibleImage", "message": "The image '/emulator' in container group 'flow-emulator-container' is not accessible. Please check the image and registry credential."

So I have decided to try the creation from Azure CLI. I can login to Container Registry without problem. But when I try to create the container with the following command, I still have the same error, and I have no Idea how to troubleshot it...

In PowerShell:

az container create --resource-group Flow --name flow-emulator --image <ContainerRegistry.azurecr.io>/emulator --cpu 1 --memory 1 --registry-login-server <ContainerRegistry.azurecr.io> --registry-username <username> --registry-password <password> --dns-name-label flow-emulator-container --ports 80 --os-type windows
1

1 Answers

2
votes

For your issue, according to you said that you can log in to the Container Registry without a problem, then I think the most possible reason is you need to add a tag that you need to use for your image.

For example, your command should be like this:

az container create --resource-group Flow --name flow-emulator --image <ContainerRegistry.azurecr.io>/emulator:tag --cpu 1 --memory 1 --registry-login-server <ContainerRegistry.azurecr.io> --registry-username <username> --registry-password <password> --dns-name-label flow-emulator-container --ports 80 --os-type windows

You can choose an available tag for your image. By the way, you'd better make sure the username and password are really right again even if you check it before.