Update 2021/2/10: BcContainerHelper has replaced NavContainerHelper. This blog post still reference NavContainerHelper, which is outdated.
Just as you thought you were getting the hang of running Business Central in docker, then you see this title! Your first thought is probably how big the changes are to your pipelines and to your scripts and how much time you will have to perform these changes.
Easy now!
Nothing will have to change overnight – everything that worked yesterday should still work and you will just be able to run Business Central in docker in a new way starting today…
What?
The big change is, that Microsoft will stop producing docker images and instead publish builds as artifacts, which can be used together with the generic docker image to run the image you want.
Why?
There are a number of reasons why this change is being done. If we look at how Business Central images are built, then the generic image is SQL Express, IIS and some PowerShell scripts added to dotnet/framework/runtime.
On top of that we add a w1 layer for every version of Business Central and on top of that a number of local images (20 for onprem).

When running an image like this, it works best if you are using the same OS Version for windows/servercore and he host (see more here: https://docs.microsoft.com/en-us/virtualization/windowscontainers/deploy-containers/version-compatibility). In fact we have had multiple problems with people running different versions causing all kinds of issues. For some time, we tried to build the images on the version of windows/servercore giving the least amount of issues, but our MS security team is telling us, that we cannot use old and un-patched versioins of windows/servercore – it is a security risk, and I cannot really argue against that.
Even worse – I know of partners who are trying to not update their host machines in order to avoid compatibility problems with new updates.
The fact sheet for explaining the support for Windows OS’ can be found here: https://support.microsoft.com/en-us/help/13853/windows-lifecycle-fact-sheet – ltsc builds are supported for 10 years, sac builds for 18 months. Every supported build will get new cumulative updates every month. While writing this, there are 8 supported versions of Windows supported for Docker (host and container OS).
Every time a new windows/servercore is shipped (8 every month), the dotnet framework team ships a new image based on that windows/servercore, and every time a new dotnet/framework/runtime image is published we publish a new generic image (the layer with SQL Express, IIS and PS Scripts).
That is all goodness, that is manageable.
The problem comes if we are to continue the rebuild up the chain. While writing this, there are 176 w1 on premises images out there and there are 20 localizations on top of these – giving a total of 3500+ images and new images are added every month (and then we haven’t even counted the sandbox images and the daily builds). If we were to build these for every new version of the generic layer, every month – we would have to build 28.000+ images every month and publish these (that would be ~280 Terabytes of images every month) and a lot of these images would probably never be used.
So, lets go back to where things were manageable – we build the generic images and use these. This is where I added the -useBestContainerOS parameter. This parameter worked like this:

- You pull the image you want to run
- You extract the artifact from that image (binaries, database, apps etc.)
- You pull the generic docker image
- You share the artifacts with the container
- You run the generic image with these artifacts
That works, but isn’t really efficient.
The specific docker image is ~10Gb (~15Gb for ltsc2016). The Generic image is ~6Gb and since the generic is build on a different windows/servercore – you always have to download both.
You are actually downloading ~10Gb of docker image for the soul purpose of extracting artifacts (which are around 1Gb in size)
Adding to that, docker images are not the best artifact cache and cleanup etc. is cumbersome.
So in the future, we will be publishing artifacts instead of docker images. Artifacts will be available through a CDN for very fast download and is fully integrated in NavContainerHelper and the generic docker image, the process will instead look like this:

- Pull the generic image
- Run the image with a parameter specifying where to find the artifacts
- Download the artifacts during run
Using the ContainerHelper, it will actually download the artifacts beforehand and cache them on the host computer.
How?
The very first thing you need to do is, to update the NavContainerHelper to 0.7.0.7 or later. The next thing you need to do is to find the artifactUrl. There is a function for this:
$artifactUrl = Get-BCArtifactUrl -version 16.2 -country us -select Latest
This will give you the artifactUrl for the latest 16.2 Business Central sandbox artifacts. This artiactUrl can be passed directly to New-BcContainer instead of the imagename:
The running container should work EXACTLY like a running container based on an image, it just takes a little longer to start.
When can I try this?
You can try this out today. The generic images are out there and NavContainerHelper is supporting this. All existing on-premises artifacts have been published (-type onprem on Get-BcArtifacts) and a number of the later sandbox artifacts.
Do play around with Get-BcArtifactUrl and Get-NavArtifactUrl to get artifactUrls for the various versions of Business Central and NAV. Try to run them and see if everything works as it used to do – it should.
If you experience issues, please file issues here: https://github.com/microsoft/navcontainerhelper/issues and remember to pass the full script and the full output of the script – that will help me identify why things didn’t work as expected.
When do we switch over?
If everything goes as planned, July update will be the last image, which gets published as a docker image. After this, the docker images will stay for a while to ensure that everybody using them have had a chance to switch.
Insider images will also become available as artifacts and will be published more frequently, faster and more reliable than docker images. Insider images stop being published as docker images in July as well.
What now?
As you can imagine, a lot of documentation will need to change. A lot of blogs and how-tos will need to be updated, CI/CD documentation etc. etc. – I will work on that for the next weeks.
I will also monitor the NavContainerHelper issues list to see if things are running as expected.
and… – the next blog posts will go more into detail about the new functions and how things really works.
Enjoy
Freddy Kristiansen
Technical Evangelist
This sounds great to me Freddy. Thank you for the update.
LikeLike
This is such a huge and amazing update. Will definetely improve our workflow. Thanks Freddy!
LikeLike
This is such a huge and amazing update. Seems like it will definitely improve our workflow. Thanks Freddy!
LikeLike
` (apostrophe) is missed after -accept_eula
LikeLike
Indeed – have fixed this.
LikeLike
Great Job!
LikeLike
great update! – looks like process isolation is working again on my win 10 ๐ ๐ ๐
is there any way to pull NAV 2018 CUxx Images without knowing the build no?
it’s hard to explain to our users, that they must know the build know (or look them up)
LikeLike
sorry – i mean artifacts – not images
LikeLike
Get-NavArtifactUrl will help you there.
LikeLiked by 1 person
Is there a way to list all BC/NAV artifacts?
LikeLike
Get-BCArtifactUrl -type OnPrem -select All
Get-BCArtifactUrl -type Sandbox -select All
Please ignore the ones ending on /platform – that is a bug in get-bcartifacturl.
LikeLiked by 2 people
โค !!!!!
LikeLiked by 1 person
Pingback: Working with artifacts | Freddys blog
Hi, Freddy.
Thanks for everything first. I have two questions, see if you can help me.
We have a development done with the version mcr.microsoft.com/businesscentral/onprem:16.0.11240.12076-it’s this version is not in the artifacts Do you know if they will upload more versions in the next days?
And the other one. In your Azure templates are you going to use artifacts?
Thank you very much.
LikeLike
https://bcartifacts.azureedge.net/onprem/16.0.11240.12085/it is 2020 wave 1 – not sure why the DVD’s are 12076 – I think 12085 was the one we shipped on docker as well. These are the same platform – not sure whether there are any app changes in that, but you should be able to use this.
currently the dev branch of aka.ms/getbc has artifacts support. You get the dev branch by adding a 2 – meaning: http://aka.ms/getbc2 will have both artifacts and image support. Will be in master next week.
LikeLike
Thanks Freddy!!!
LikeLike
Pingback: Changing the way you run Business Central in dockerโฆ | Pardaan.com
Pingback: Working with artifacts | Pardaan.com
It may be a stupid question – so you are allowed to drop a stupid answer ๐
What is the deal with the “generic image” … I mean, what’s inside of it that it needs to be such a “god image” ? Well, obvious it keeps your tools inside (aren’t they similar to an artifact as well?)
I guess the idea is also to take away a bit the complexity that people would need to go through… just curious if you see any chance that this “godness” will disappear? Or in other words what would it take to get the same stuff running without using the generic image ๐
LikeLike
found what i needed …. “Run Business Central in docker using a custom generic image” ๐
LikeLike
There are absolutely no secrets here – the generic image has always been the foundation of the other images and has always been open source.
It is just like a VM with dotnet, IIS, SQL Express and other pre-requisites installed – and then the installation scripts from the nav-docker repo (as you found).
Earlier it wasn’t really possible to modify since all images was build on top of this – now, you can.
LikeLike
so now what is the use of ‘-always pull’.
LikeLike
alwayspull will just ensure you have the latest generic image (and if that was refreshed – build a new cached image if you request that)
LikeLike
Reblogged this on Fun with C/SIDE and commented:
The future is here – good bye to images, hello to artifacts!
LikeLiked by 1 person
This works great, saves at lot of disk space, and seems much faster running the container. Great job
LikeLike
Pingback: Creating a Dynamics 365 Business Central Docker container with artifacts on Azure Container Instances - Dynamicsย 365 Businessย Central Community
Pingback: July updates are out – they are the last on-premises docker images | Freddys blog
Pingback: July updates are out โ they are the last on-premises docker images - Dynamicsย 365 Businessย Central Community
Pingback: Working with artifacts - Freddy's Blog - Dynamics 365 Business Central/NAV User Group - Dynamics User Group
Pingback: ArcherPoint Dynamics NAV Business Central Developer Digest - vol 303 - Microsoft Dynamics NAV Community
Hi Freddy,
Not sure this is the right place for this question, but I can’t get the next major and next minor artifact urls.
$artifact = “bcartifacts/sandbox//us/SecondToLastMajor”
resulting artifact url is https://bcartifacts.azureedge.net/sandbox/15.4.41023.43755/us
$artifact = “bcartifacts/sandbox//w1/Latest”
resulting artifact url is https://bcartifacts.azureedge.net/sandbox/16.3.14085.15026/w1
Am I doing something wrong?
Thanks in advance!
LikeLike
It isn’t – questions should be posted on http://www.github.com/microsoft/navcontainerhelper/issues (where the question already has been posted and answered: https://github.com/microsoft/navcontainerhelper/issues/1139)
but…
what you need is the insider sas token from collaborate – and to set storageaccount to bcinsider.
What you get above is the latest and the second to last major build from the public repo.
LikeLike
Hi Freddy, thank you for your blog!!
I have a question, How could I download the generic docker image before get the artifact?
Thanks in advance ๐
LikeLike
A bit confusion:
We run the
install-module navcontainerhelper -force
and
Update-Module navcontainerhelper -Force
We get the following message from the script:
NavContainerHelper is version 0.7.0.4
How do we get the necessary update to 0.7.0.7
?
LikeLike
Restart PowerShell to load the latest modules after updating.
Or Remove-Module
LikeLike
Is this a good change? Yes.
However, I think the switch was fast. Too fast. 1 month turn around? Jfc. No real communication unless you follow this blog. It’s kind of insane to me that we weren’t given more time, more notice, communication elsewhere.
Not great.
LikeLike
Sorry.
LikeLike
In the end – no images are removed – everything that was running still runs.
If you need a new version – you need to do things differently.
docs are updated but in the end – if you are using docker and NAV/BC – you should follow this blog and/or #msdyn365bc on twitter
LikeLike
This may not be the proper place to ask this but i looked and could not find it… I tried setting up a working container of Dynamics365 to play with VSCode and do some development.
I first tried the sandbox but i could never load the symbols.
Then i went to docker and downloaded the Businesscentral Sandbox (docker pull mcr.microsoft.com/businesscentral/sandbox).
Took a while but when i tried to
docker run -e accept_eula=Y -m 4G mcr.microsoft.com/businesscentral/sandbox
it gave me errors.
Then I found Creating your Workshop environment here and followed the instructions using the template to create an Azure VM. but the status is stuck
5:07:54 PM Launch SetupVm
5:07:52 PM Register RestartContainers Task to start container delayed
5:07:46 PM Using BcContainerHelper version 1.0.4
5:07:05 PM Installing Latest Business Central Container Helper from PowerShell Gallery
for one hour and monitoring activity on portal shows almost no cpu activity last hour, so it looks like nothing is happening.
I will try docker again as maybe i didnt do something right, but i am getting a bit discouraged.
LikeLike
Create on online trial sandbox and use VS Code with that – that is very very easy to get started with.
If you want docker – use the powershell module BcContainerHelper and use the New-BcContainerWizard function to help you create a container with the right settings.
LikeLike
Hi Freddy
Having issues get any artifact for BC13. Is there a trick? I have tried a number of combinations but nothing seems to work.
Get-BCArtifactUrl -version ‘13.1’ -country ‘gb’
Get-BCArtifactUrl -version ‘13.0.25940’ -country ‘gb’
using a recent BCContainerHelper (was latest as of 2020/09/21)
BCContainerHelper 1.0.6 installed
LikeLike
specify -type onprem
LikeLike
Doh! Thank you.
LikeLike
Pingback: Where to find the Microsoft Dynamics 365 Business Central (and NAV) Docker Images (updated)
Pingback: Troubleshooting Business Central on Docker | Freddys blog
Pingback: Troubleshooting Business Central on Docker - Freddy's Blog - Dynamics 365 Business Central/NAV User Group - Dynamics User Group
Hello Freddy,
I have created with aka.ms/getbc an Azure VM (navserver) and now I want to create an new container in this VM (navserver2) stop the old one and acces to the new one the same way that before trought the landing page.
Looks that using -PublicDnsName and -useSSL is not enough, could you give me some hints ?
Regards
LikeLike
In the BcContainerHelper PowerShell prompt, you can use Replace-BcServerContainer -artifactUrl $artifactUrl to replace the existing container with a new with the same settings.
Alternatively you should enable traefik on the VM (when created) then all containers become accessible on the landing page.
LikeLike
Hello Freddy,
I was looking for a “Switch-BcServerContainer” but I can “live” with this solution, thank you very much.
Regards
LikeLike
Great Post Freddy !…. But I Should have checked in ealyer ๐ …
Keep up the good work ๐
LikeLike
Pingback: Docker Artifacts - theDenSter
Pingback: Removing all specific NAV and Business Central Docker Images | Freddys blog