How I do Docker

Image result for docker

I had quite a few conversations about Docker this past week at Directions. And in every conversation, I basically said that my Docker usage is done with one-liners. So perhaps it would be smart to list all my one-liners. So here goes:

To install Docker for Windows on my Windows 10 PC, I use Chocolatey – with this simple PowerShell command:

choco install Docker-for-Windows

Then you need to install the brilliant NavContainerHelper with another PowerShell one-liner:

install-module navcontainerhelper -force

Now we’re ready to create a Docker container. Warning: This is a one-liner, but it’s a long one, you better put it in a .ps1 file, instead of copy’paste directly to a PowerShell prompt.

New-NavContainer -accept_eula -alwaysPull -imageName "microsoft/bcsandbox:dk" -containerName bcsandbox -licenseFile 'C:\license\my2018.flf' -memoryLimit 4G -updateHosts -shortcuts Desktop -includeCSide -assignPremiumPlan -auth NavUserPassword -myScripts @{"AdditionalOutput.ps1" = 'Copy-Item -Path (Join-Path $roleTailoredClientFolder "*office*.dll") -Destination (Join-Path $serviceTierFolder "Add-ins\Office")'}

Since this is quite a long command, let me break it down into the important parameters:

accept_eula Because where’s the fun without an EndUserLicenseAgreement to accept
alwaysPull Make sure you have the latest version of the image from Microsoft.
imageName What image your container should be based on.
-containerName This is the “computer name” your container will get. This is the name you can PING, this is the name you’ll use in the browser address bar and in Visual Studio Code to access the container.
licenseFile An URL or direct file path to an FLF license file to be imported to the container.
memoryLimit Limit the memory used by the container.
updateHosts Update the hosts file with an entry for the imageName.
shortCuts Create shortcuts for access to the container.
includeCSide Because we still need CSide
assignPremiumPlan Hey, I need a Premium experience
auth NavUserPassword Create a NavUserPassword access. The first thing happening is a prompt to enter a user and password. It looks like it’s asking for you login, but the dialogue is actually asking for a user and password combo.

The last command is just something I need because some Office DLLs are missing in the add-ins folder (to be available for DotNet), you properly don’t need it unless you’re using DotNet like me:
myScripts @{“AdditionalOutput.ps1” = ‘Copy-Item -Path (Join-Path $roleTailoredClientFolder “*office*.dll”) -Destination (Join-Path $serviceTierFolder “Add-ins\Office”)’}

Speaking of DotNet, sometimes I need to add extra DotNet DLLs, that’s done with this one-liner:

Copy-FileToNavContainer -localPath c:\DLLs\*.dll -containerPath "C:\Program Files\Microsoft Dynamics NAV\130\Service\Add-ins" -containerName bcsandbox

Again a great feature of NavContainerHelper, simply copies files from my local machine into the container.

Sometimes,  I need to restart the container, also done with NavContainerHelper:

Restart-NavContainer -containerName bcsandbox

Hope this helps a bit to lean but great Docker and Business Central/NAV experience.


Microsoft Dynamics 365 Business Central Release

Today Microsoft Dynamics 365 Business Central has been released, both for the cloud and On-Premise.

So wait! Erik, remind me again, what’s “Business Central”?

Business Central is the new version of NAV, you could call it NAV2019, but don’t do that. The NAV name is retired, well almost. The NAV name lives on for the experience you get when you use the Windows Role Tailored Client:

And yes, just to put an end to all the mumbling, Business Central has both RTC and C/Side. Everything you have in NAV2018 is also in Business Central. That plus the new beautiful user interface in all the other clients.

More details to come, grab the docker images


Offline documentation for NAV and Business Central

Microsoft is rapidly aggregating all their documentation on This also includes documentation for Microsoft Dynamics NAV and all the 365 variants, including Business Central.

One of the many cool functions of docs, yeah, that’s the lingo, is the ability to download sections as PDF for offline usage. In some cases a PDF is just easier, I’m sitting in an airport lounge right now and I know that I’ll need the documentation on the plane.

So I simply click the “Download PDF” in the lower left corner, and gets a PDF with everything from the current page and below.

To make it even easier, here are the direct links for:

Business Central, Developer and IT Pro Documentation

Business Central, User Guide

Dynamics NAV, Developer and IT Pro Documentation

Happy Reading 🙂

Please remember, that is constantly evolving and expanding, so I suggest using the online version when you have the change, or if you enjoy PDFs, remember to download an updated version regularly.