0

I am running the following in Powershell to create a Business Central Container in Azure

 $imageName = "mcr.microsoft.com/businesscentral/sandbox:16.2.13509.23270-us";
 $resourceGroup = "RG1";
 $location = "westeurope"
 $containerName = "d365bcrg1"
 $dnsName = "d365bcrg1.westeurope.azurecontainer.io"
 $artifactUrl = Get-BCArtifactUrl -version 16.2 -country us -select Latest

 az group create --name $resourceGroup --location $location

 az container create -g $resourceGroup -n $containerName --image $imageName --os-type Windows --cpu 2 
 --memory 16 --ip-address public -e artifactUrl=$artifactUrl ACCEPT_EULA=Y USESSL=N ClickOnce=Y
 publicDnsName=$dnsName --dns-name-label $containerName `
--ports 80 7046 7047 7048 7049 8080

But i keep getting the error:

The image 'mcr.microsoft.com/businesscentral/sandbox:16.2.13509.23270-us' in container group 
'd365bcrg1' is not accessible. 
Please check the image and registry credential.

What registry credential ? Not sure why this is happening , need some help with this its been almost 2 days ?

Modified script:

 $imageName = "mcr.microsoft.com/businesscentral:10.0.19042.630";
 $location = "westus"
 $dnsName = "d365bcrg1.westus.azurecontainer.io"
 $artifactUrl = Get-BCArtifactUrl -version 16.2 -country us -select Latest

az container create -g RG1 -n d365bcrg1 --image $imageName 
-- os-type Windows --cpu 2  --memory 16 --ip-address public -e 
  artifactUrl=$artifactUrl ACCEPT_EULA=Y USESSL=N ClickOnce=Y 
   publicDnsName=$dnsName --dns-name-label d365bcrg1 --ports 80 443 7046 
   7048 7049 8080
Abbey
  • 153
  • 2
  • 11
  • Any update? Does [this](https://stackoverflow.com/questions/66544297/cant-pull-a-microsofts-docker-container) help you? – Nancy Mar 18 '21 at 08:46
  • I am new to all of this and trying to work it out.. I am confused with the $imageName . and $artifacturl. Are they related in any way ? I have tried following some examples but with no luck. All i want is to spin up a Business Central container in Azure, not a VM because i need a number of people to connect for development and a VM will require certificates . Is my location westeurope wrong ? Also i want an image that wont give me the error , it is outdated ? – Abbey Mar 18 '21 at 09:24
  • Where do you get this image URL? – Nancy Mar 18 '21 at 09:37
  • you mean where did i get it from ? I was reading Freddys blog – Abbey Mar 18 '21 at 09:38
  • Yes, where do you get it from? any link? I just find this https://hub.docker.com/_/microsoft-businesscentral – Nancy Mar 18 '21 at 09:42
  • Yes if i use the following mcr.microsoft.com/businesscentral:10.0.19042.630 I get the error: Unsupported windows image version. Supported versions are 'Windows Server 2016 - Before 2B, Windows Server 2019 - Before 2B, Windows Server 2016 - After 2B, Windows Server 2019 - After 2B, Windows Server, Version 1903 - After 2B, Windows Server, Version 2004' – Abbey Mar 18 '21 at 09:44
  • I have modified the script above to a different location, westus – Abbey Mar 18 '21 at 09:47
  • Let us [continue this discussion in chat](https://chat.stackoverflow.com/rooms/230072/discussion-between-abbey-and-nancy-xiong). – Abbey Mar 18 '21 at 10:15

2 Answers2

0

As I can see, the image is not publicly accessible or in the wrong format or does not exist. Read Microsoft Container Registry (MCR) for more details.

enter image description here

From Guidance for using the official Microsoft Container Registry (MCR) endpoints:

If you experience issues with pulling artifacts from MCR, contact Microsoft Support. You can also submit an issue in the official MCR GitHub repository.

For a private image, you need to provide the credentials to log in container image registry server. It's recommended to create a container image from application source and create an Azure container registry and upload your image to ACR and deploy the azure container instance from your registry image.

Nancy
  • 26,865
  • 3
  • 18
  • 34
0

Azure Containers are not supported for running Business Central containers.

You can read more about it in this issue on GitHub.

If you want to run in Azure, you need to use a Windows Server with Containers VM.

kaspermoerch
  • 16,127
  • 4
  • 44
  • 67
  • Not sure that is entirely true. I have ran up one before and managed to connect. But for some reason I cant get the correct image , it keeps giving "not supported in location error" Have a look at the following link https://svirlan.com/2019/01/01/how-to-generate-azure-containers-instances-loaded-with-business-central-in-minutes/ I have followed this link but the imagname is probably outdated by now and the artifact has probably changed, Thats what I am having issue with. I prefer not to use a VM cause i need multiple developers to connect to it which will require certificates. – Abbey Mar 20 '21 at 01:15
  • It might have worked previously when the version specific images were available in Microsofts registry. It is not (and has never been) officially supported. – kaspermoerch Mar 22 '21 at 08:04
  • so would you knwo how i can get a business central container in Azure with the above scripts at all ? – Abbey Mar 22 '21 at 08:37
  • You might be able to run it on an Azure Container if you build the images and then upload them to your own image registry. I do however think the best solution would be to use an Azure VM with traefik as mentioned in the GitHub issue I linked. – kaspermoerch Mar 22 '21 at 10:07