Lately we have been seeing an increasing number of people having difficulties creating Docker containers on multiple host OS’. Since Thursday, I have been diving into error reports on GitHub, looking in Telemetry and had some partners helping out trying various tests to see what the result of various changes would be.
As an example, achim-t have run test scripts at least 20 times here, since it wasn’t possible for me to repro the problems, but also this, this and several other issues are from people having issues. Typically, the problem goes away when you use hyperv isolation, when you switch off Windows Defender or other anti-virus software – or when you are running on a Windows Server OS.
New Generic Image
As a result, a new generic image (currently version 1.0.2.4), which should resolve most of these issues (for NAV/BC versions 15 and up) is available in preview at this time – add -dev to the generic image name and you will get the preview.
-useGenericImage "$(Get-BestGenericImageName)-dev"
Also, the latest BcContainerHelper preview will automatically select the preview image when creating containers, there you don’t have to do anything. The next BcContainerHelper will even present you with a warning if you are running an OS, isolation mode and/or NAV/BC version which might require you to use Hyper-V or switch off Windows Defender while creating the container.
You can determine which generic image version you are using by looking for the Generic Tag in the container output (the -dev part is included in the next BcContainerHelper version):

The new generic image will likely be promoted to prod within the next week, so please let me know if you run into any issues when using this version, by creating an issue on https://github.com/microsoft/navcontainerhelper/issues.
Note: Do not respond to other people’s issues – create your own, thanks.
Thanks
Freddy Kristiansen
Technical Evangelist
It worked for my issue – probably the defender or the antivirus software. Thx!
LikeLike
Thank you Freddy.
Is it possible to let the DevOps Pipeline agent run the containers with hyperv isolation?
LikeLiked by 1 person
Typically DevOps pipelines are running on Windows Server OS, which doesn’t have the problem.
If you do, it all depends on what you use for your DevOps?
Basically you need to make sure the New-BcContainer is called with -isolation hyperv.
LikeLiked by 1 person
Can we set that flag -isolation hyperv when we use the Run-AlPipeline from your script?
LikeLiked by 1 person
You can create a bccontainerhelperconfig.json on the machine and set “defaultNewContainerParameters” = { “isolation” = “hyperv” }
That should cause all containers spun up on this machine to use hyperv (unless specifically specified otherwise)
LikeLiked by 1 person
You are the best
LikeLiked by 1 person