In Advania we are switching more and more to using the Docker images for Dynamics NAV and Business Central development.
Since version 1809 of Windows 10 and the latest blog post from Arend-Jan Kauffmann we are moving to using the Docker EE engine instead of the Docker Desktop setup.
Using the latest Windows 10 version and the latest version of Docker means that we can now use “Process Isolation” images when running NAV and Business Central.
Not using process isolation images on Windows 10 requires Hyper-V support. Inside Hyper-V a server core is running as the platform for the processes executed by the container created from the image. If using process isolation images then the Windows 10 operating system is used as foundation and Hyper-V server core is not needed. Just this little fact can save up to 4GB of memory usage by the container.
Freddy Kristiansen announced in this blog that his PowerShell Module, NAVContainerHelper, had support for selecting the proper Docker Image based on the host capabilities.
We have had some issues with our Windows installations and I wanted to give you the heads up and how these issues where resolved.
First thing first, make sure that you are running Windows 10 version 1809 or newer. Execute
in Windows-R to get this displayed.
Optional, make sure to remove the Hyper-V support if you are not using any virtual machines on your host. If you have version 1903 or later I suggest enabling the Hyper-V feature.
Restart your computer as needed.
Start PowerShell ISE as Administrator.
Copy from Arend-Jan‘s blog the Option 1: Manual installation script into the script editor in Powershell ISE and execute by pressing F5.
If you have older Docker Images download you should remove them. Executing
docker rmi -f (docker images -q)
in your PowerShell ISE prompt.
Now to the problems we have encountered.
The NAVContainerHelper added a support for the process isolation images just a few releases ago. Some of our machines had older versions installed and that gave us problems. Execute
Get-Module NAVContainerHelper -ListAvailable
in PowerShell ISE prompt to make sure you have version 0.5.0.5 or newer.
If you have any other versions installed use the File Explorer to delete the “navcontainerhelper” folder from
C:\Program Files (x86)\WindowsPowerShell\Modules
in PowerShell ISE prompt to install the latest versions. Verify the installation.
We also had problems downloading the images. Getting the error “read tcp 172.16.4.17:56878->188.8.131.52:443: wsarecv: An existing connection was forcibly closed by the remote host.“.
My college in Advania, Sigurður Gunnlaugsson, figured out that multiple download threads caused network errors.
In PowerShell ISE prompth execute
Stop-Service docker dockerd --unregister-service
to remove the docker service. Then re-register docker service using
dockerd --exec-opt isolation=process --max-concurrent-downloads 1 --register-service Start-Service docker
in the PowerShell ISE prompt.
This should result in only one download thread and this way our download was able to complete.
More details on Docker images for Dynamics NAV and Business Central can be found in here.
Waldo’s Blog on Docker Image Tags