Dynamics 365 Business Central Sandbox Docker containers and multitenancy

I saw on different forums people having troubles on connecting to their brand new Docker containers created with the new BcContainerHelper module by using the sandbox artifacts (image of the online sandbox).

The new module for creating Docker containers for Dynamics 365 Business Central (that will replace NavContainerHelper) is well explained on the Freddy’s blog, so for more details please read it.

When you create a Dynamics 365 Business Central container, now a generic image is pulled from the container registry and then artifacts (specificity) are downloaded from a CDN network. This permits to Microsoft to maintain only a generic image and not N different big images for each version and localization.

You can retrieve the artifact urls by using the following cmdlet:

$artifactUrl = Get-BCArtifactUrl -country "it"

and this retrieves the url of the latest SANDBOX image for the selected localization (use -type onprem if you want the on-premise image instead).

Then you can create a new container based on that artifact url by using the New-BcContainer cmdlet and by passing the artifact url as follows:

New-BcContainer -accept_eula `
   -containerName $containerName -artifactUrl $artifactUrl `
   -Credential $credential -auth UserPassword `

What happens here is that we’re creating a new container based on the SANDBOX image (Dynamics 365 Business Central SaaS). Dynamics 365 Business Central SaaS is a multitenant environment and with BcContainerHelper all containers created by using the SANDBOX image are now multitenant by default.

What does it mean?

When the container is created, if you create a new AL project (AL:Go!) and you try to connect to your container with the standard launch.json settings, you could have some problems on authenticating to the container and downloading symbols.

To solve these problems, you need to add the tenant property to your launch.json file and passing the tenant name:

You can see your container’s tenants by executing the following cmdlet:

Get-BcContainerTenants -containerName $containerName

If you don’t want to create a multitenant container, you should add -multitenant:$false to the above script and all will work like in NavContainerHelper.

Comment List