4

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
Charles Xu
  • 29,862
  • 2
  • 22
  • 39
Roman Lushkin
  • 131
  • 1
  • 2
  • 12

1 Answers1

4

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.

Charles Xu
  • 29,862
  • 2
  • 22
  • 39
  • I have also tried this (), but the result stays the same. I have even tried to change the target OS of the image by switching on Linux. I don't know if the problem comes from the Image itself, because I successfully created a container from the Image in my local Docker. I have created a new .net core console project as well, and did not have this problem. I keep going on my investigation. – Roman Lushkin Oct 17 '19 at 07:51
  • @RomanLushkin Are you sure you use the right tag of the image stored in your container registry? And which username and password do you use? – Charles Xu Oct 17 '19 at 07:53
  • Absolutely :) I did the same workflow with the newly created console app. and successfully created the container on Azure – Roman Lushkin Oct 17 '19 at 07:58
  • After the last check, you were right, I put a wrong tag in my command line => :v10 instead of :v1.0, after fixing this mistake, I successfully created the container. Thanks a lot it was a stupid mistake, that I didn't figure out. – Roman Lushkin Oct 17 '19 at 08:04