Nav on Docker HOL

Original URL…

All shipped versions of NAV since NAV 2016RTM are available on the public docker hub, where you also can find the EULA and the supported tags:
Under Tags, you will find a list of all the tags in the public repository. Docker images are constructed in layers. That means a Docker pull will only need to download those
layers that are different from already downloaded layers.
Docker image names are build up of 3 sections:
<registry> can be a private registry (like or the public docker hub, using a single identifier (like microsoft).
<repository> is for all NAV images dynamics-nav
<tag> determines which NAV image to get.
The tag is build up by this syntax: [[version][cu]][localization]
All parts of the tag are optional and if you omit a part, you will get the latest (or w1 for the localization).
Parts are seperated by a dash if multiple parts are specified and all parts are specified using lower case characters.
Example of valid image names:
microsoft/dynamics-nav – gives you the latest cumulative update for the latest NAV version with the worldwide (W1) localization
microsoft/dynamics-nav:dk – gives you the latest cumulative update for the latest NAV version with the Danish (DK) localization
microsoft/dynamics-nav:2017-w1 – gives you the latest cumulative update for NAV 2017 with the worldwide localization
microsoft/dynamics-nav:2016-cu24 – gives you CU24 NAV 2016 with the worldwide localization
microsoft/dynamics-nav:2018-cu2-na – gives you the CU2 for NAV 2018 with the North American (NA) localization
The number of tags is pretty extensive, but you can build up any tag from the above syntax.
The devpreviews are special tags [devpreview][month][localization] – devpreview-february is the latest while writing and localization starts with fin (for financials)
Additionally all images are tagged with [buildnumber][localization], where buildnumber is the build number (e.g. 11.0.20348.0)
As a consequence, microsoft/dynamics-nav:11.0.20348.0-dk – gives you NAV 2018 CU2 with Danish localization.

Get started with Docker for Windows

Original URL…

Welcome to Docker for Windows!

Docker is a full development platform for creating containerized apps, and Docker for Windows is the best way to get started with Docker on Windows.

See Install Docker for Windows for information on system requirements and stable & edge channels.

Test your installation

  1. Open a terminal window (Command Prompt or PowerShell, but not PowerShell ISE).
  2. Run docker --version to ensure that you have a supported version of Docker:
    > docker --version
    Docker version 18.03.0-ce, build 0520e24
  3. Pull the hello-world image from Docker Hub and run a container:
    > docker run hello-world
    docker : Unable to find image 'hello-world:latest' locally
    Pulling from library/hello-world
    Pulling fs layer
    Download complete
    Pull complete
    Digest: sha256:97ce6fa4b6cdc0790cda65fe7290b74cfebd9fa0c9b8c3
    Status: Downloaded newer image for hello-world:latest
    Hello from Docker!
    This message shows that your installation appears to be working correctly.
  4. List the hello-world image that was downloaded from Docker Hub:
    > docker image ls
  5. List the hello-world container (that exited after displaying “Hello from Docker!”):
    > docker container ls --all
  6. Explore the Docker help pages by running some help commands:
    > docker --help
    > docker container --help
    > docker container ls --help
    > docker run --help

Explore the application

In this section, we demonstrate the ease and power of Dockerized applications by running something more complex, such as an OS and a webserver.

  1. Pull an image of the Ubuntu OS and run an interactive terminal inside the spawned container:
    > docker run --interactive --tty ubuntu bash
    docker : Unable to find image 'ubuntu:latest' locally
    Pulling from library/ubuntu
    Pulling fs layer
    Pulling fs layer
    Pulling fs layer
    Digest: sha256:e348fbbea0e0a0e73ab0370de151e78006844
    Status: Downloaded newer image for ubuntu:latest

    Do not use PowerShell ISE

    Interactive terminals do not work in PowerShell ISE (but they do in PowerShell). See docker/for-win/issues/223.

  2. You are in the container. At the root # prompt, check the hostname of the container:
    root@8aea0acb7423:/# hostname

    Notice that the hostname is assigned as the container ID (and is also used in the prompt).

  3. Exit the shell with the exit command (which also stops the container):
    root@8aea0acb7423:/# exit
  4. List containers with the --all option (because no containers are running).The hello-world container (randomly named, relaxed_sammet) stopped after displaying its message. The ubuntu container (randomly named, laughing_kowalevski) stopped when you exited the container.
    > docker container ls --all
    CONTAINER ID    IMAGE          COMMAND     CREATED          STATUS                      PORTS    NAMES
    8aea0acb7423    ubuntu         "bash"      2 minutes ago    
    Exited (0) 2 minutes ago             laughing_kowalevski
    45f77eb48e78    hello-world    "/hello"    3 minutes ago    
    Exited (0) 3 minutes ago             relaxed_sammet
  5. Pull and run a Dockerized nginx web server that we name, webserver:
    > docker run --detach --publish 80:80 --name webserver nginx
    Unable to find image 'nginx:latest' locally
    latest: Pulling from library/nginx
    fdd5d7827f33: Pull complete
    a3ed95caeb02: Pull complete
    716f7a5f3082: Pull complete
    7b10f03a0309: Pull complete
    Digest: sha256:f6a001272d5d324c4c9f3f183e1b69e9e0ff
    Status: Downloaded newer image for nginx:latest
  6. Point your web browser at http://localhost to display the nginx start page. (You don’t need to append :80 because you specified the default HTTP port in the docker command.)Run nginx edge
  7. List only your running containers:
    > docker container ls
    CONTAINER ID    IMAGE    COMMAND                   
    CREATED          STATUS          PORTS                 NAMES
    0e788d8e4dfd    nginx    "nginx -g 'daemon of…"    
    2 minutes ago    Up 2 minutes>80/tcp    webserver
  8. Stop the running nginx container by the name we assigned it, webserver:
    >  docker container stop webserver
  9. Remove all three containers by their names — the latter two names will differ for you:
    > docker container rm webserver laughing_kowalevski relaxed_sammet

Docker Settings dialog

The Docker for Windows menu is a popup by which you can configure your Docker settings — installation, updates, version channels, Docker Hub login, and more.

This section explains the configuration options accessible from the Settings dialog.

  1. Open the Docker for Windows menu by right-clicking the Docker icon in the Notifications area (or System tray):Showing hidden apps in the taskbar
  2. Select Settings… to open the Settings dialog:Docker for Windows popup menu


On the General tab of the Settings dialog, you can configure when to start and update Docker.


  • Start Docker when you log in – Automatically start the Docker for Windows application upon Windows system login.
  • Automatically check for updates – By default, Docker for Windows automatically checks for updates and notifies you when an update is available. Click OK to accept and install updates (or cancel to keep the current version). You can manually update by choosing Check for Updates from the main Docker menu.
  • Send usage statistics – By default, Docker for Windows sends diagnostics, crash reports, and usage data. This information helps Docker improve and troubleshoot the application. Uncheck to opt out. Docker may also sometimes prompt you for more information.

Shared drives

Share your local drives (volumes) with Docker for Windows, so that they are available to your Linux containers.

Shared drives

Permission for shared drives are tied to the credentials you provide here. If you run docker commands under a different username than the one configured here, your containers cannot access the mounted volumes.

To apply shared drives, you are prompted for your Windows system (domain) username and password. You can select an option to have Docker Store the credentials so that you don’t need to enter them every time.

Tips on shared drives, permissions, and volume mounts

Firewall rules for shared drives

Shared drives require port 445 to be open between the host machine and the virtual machine that runs Linux containers. Docker detects if port 445 is closed and shows the following message when you try to add a shared drive:

Port 445 blocked

To share the drive, allow connections between the Windows host machine and the virtual machine in Windows Firewall or your third party firewall software. You do not need to open port 445 on any other network.

By default, allow connections to on port 445 (the Windows host) from (the virtual machine). If your firewall rules seem correct, you may need to toggle or reinstall the File and Print sharing service on the Hyper-V virtual network card

Shared drives on demand

You can share a drive “on demand” the first time a particular mount is requested.

If you run a Docker command from a shell with a volume mount (as shown in the example below) or kick off a Compose file that includes volume mounts, you get a popup asking if you want to share the specified drive.

You can select to Share it, in which case it is added your Docker for Windows Shared Drives list and available to containers. Alternatively, you can opt not to share it by hitting Cancel.

Shared drive on demand


The Linux VM restarts after changing the settings on the Advanced tab. This takes a few seconds.

CPU and Memory settings

  • CPUs – Change the number of processors assigned to the Linux VM.
  • Memory – Change the amount of memory the Docker for Windows Linux VM uses.


You can configure Docker for Windows networking to work on a virtual private network (VPN).

Network settings

  • Internal Virtual Switch – You can specify a network address translation (NAT) prefix and subnet mask to enable internet connectivity.
  • DNS Server – You can configure the DNS server to use dynamic or static IP addressing.

Note: Some users reported problems connecting to Docker Hub on Docker for Windows stable version. This would manifest as an error when trying to run docker commands that pull images from Docker Hub that are not already downloaded, such as a first time run of docker run hello-world. If you encounter this, reset the DNS server to use the Google DNS fixed address: For more information, see Networking issues in Troubleshooting.

Updating these settings requires a reconfiguration and reboot of the Linux VM.


Docker for Windows lets you configure HTTP/HTTPS Proxy Settings and automatically propagates these to Docker and to your containers. For example, if you set your proxy settings to, Docker uses this proxy when pulling containers.


When you start a container, your proxy settings propagate into the containers. For example:

> docker run alpine env

no_proxy=*.local, 169.254/16

In the output above, the HTTP_PROXY, http_proxy, and no_proxy environment variables are set. When your proxy configuration changes, Docker restarts automatically to pick up the new settings. If you have containers that you wish to keep running across restarts, you should consider using restart policies.


You can configure the Docker daemon to hone how your containers run. Advanced mode lets you edit the JSON directly. Basic mode lets you configure the more common daemon options with interactive settings (and also JSON).

Docker Daemon

Experimental mode

Both Docker for Windows Stable and Edge releases have the experimental version of Docker Engine enabled, described in the Docker Experimental Features README on GitHub.

Experimental features are not appropriate for production environments or workloads. They are meant to be sandbox experiments for new ideas. Some experimental features may become incorporated into upcoming stable releases, but others may be modified or pulled from subsequent Edge releases, and never released on Stable.

On both Edge and Stable releases, you can toggle experimental mode on and off. If you toggle it off, Docker for Windows uses the current generally available release of Docker Engine.

Run docker version to see if you are in Experimental mode. Experimental mode is listed under Server data. If Experimental is true, then Docker is running in experimental mode, as shown here:

> docker version

 Version:       18.03.0-ce
 API version:   1.37
 Go version:    go1.9.4
 Git commit:    0520e24
 Built: Wed Mar 21 23:06:28 2018
 OS/Arch:       windows/amd64
 Experimental:  true
 Orchestrator:  swarm

  Version:      18.03.0-ce
  API version:  1.37 (minimum version 1.24)
  Go version:   go1.9.4
  Git commit:   0520e24
  Built:        Wed Mar 21 23:21:06 2018
  OS/Arch:      windows/amd64
  Experimental: true

Custom registries

You can set up your own registries on the Basic Daemon settings.

Normally, you store public or private images in Docker Hub and Docker Trusted Registry. Here, you can use Docker to set up your own insecure registry. Simply add URLs for insecure registries and registry mirrors on which to host your images.

See How do I add custom CA certificates? and How do I add client certificates? in the FAQs.

Daemon configuration file

The Advanced daemon settings provide the original option to directly edit the JSON configuration file for the daemon.

Updating these settings requires a reconfiguration and reboot of the Linux VM.

Docker Daemon

For a full list of options on the Docker daemon, see daemon, and also sub-topics:


Kubernetes on Docker for Windows is available in 18.02 Edge (win50) and higher edge channels only.

Enable Kubernetes

Docker for Windows 18.02 CE Edge and higher include a standalone Kubernetes server that runs on your Windows host, so that you can test deploying your Docker workloads on Kubernetes.

The Kubernetes client command, kubectl, is included and configured to connect to the local Kubernetes server. If you have kubectl already installed and pointing to some other environment, such as minikube or a GKE cluster, be sure to change context so that kubectl is pointing to docker-for-desktop:

> kubectl config get-contexts
> kubectl config use-context docker-for-desktop

If you installed kubectl by another method, and experience conflicts, remove it.

  • To enable Kubernetes support and install a standalone instance of Kubernetes running as a Docker container, select Enable Kubernetes and click the Apply and restart button.An internet connection is required. Images required to run the Kubernetes server are downloaded and instantiated as containers, and the

    Program Files\Docker\Docker\Resources\bin\kubectl.exe` command is installed.

  • By default, Kubernetes containers are hidden from commands like docker
    service ls
    , because managing them manually is not supported. To make them visible, select Show system containers (advanced) and click Apply and restart. Most users do not need this option.
  • To disable Kubernetes support at any time, deselect Enable Kubernetes. The Kubernetes containers are stopped and removed, and the /usr/local/bin/kubectl command is removed.For more about using the Kubernetes integration with Docker for Windows, see Deploy on Kubernetes.

Diagnose & feedback

Use this tab to troubleshoot problems and get help from Docker.


Log on to our Docker for Windows forum to get help from the community, review current user topics, or join a discussion.

Log on to Docker for Windows issues on GitHub to report bugs or problems and review community reported issues. See Logs and Troubleshooting for more details.

To give feedback on the documentation or update it yourself, use the Feedback options at the bottom of each docs page.


On the Reset tab, you can restart Docker or reset its configuration.


  • Restart Docker – Shuts down and restarts the Docker application.
  • Reset to factory defaults – Resets Docker to factory defaults. This is useful in cases where Docker stops working or becomes unresponsive.

Switch between Windows and Linux containers

From the Docker for Windows menu, you can toggle which daemon (Linux or Windows) the Docker CLI talks to. Select Switch to Windows containers to use Windows containers, or select Switch to Linux containers to use Linux containers (the default).

Windows-Linux container types switch

For more information on Windows containers, refer to this documentation:

Settings dialog changes with Windows containers

When you switch to Windows containers, the Settings dialog only shows those tabs that are active and apply to your Windows containers:

If you set proxies or daemon configuration in Windows containers mode, these apply only on Windows containers. If you switch back to Linux containers, proxies and daemon configurations return to what you had set for Linux containers. Your Windows container settings are retained and become available again when you switch back.

Adding TLS certificates

To your Docker daemon, you can add trusted Certificate Authorities (CAs), to verify registry server certificates, and client certificates, to authenticate to registries.

See How do I add custom CA certificates? and How do I add client certificates? in the FAQs.

Docker Store

Select Docker Store from the Docker for Windows menu to access the Docker store website. From there, you can log on to Docker Store and download apps.

Docker Store is a component of the next-generation Docker Hub and the best place to find compliant, trusted commercial and free software distributed as Docker Images.

Refer to the Docker Store documentation

Docker Cloud

Select Sign in /Create Docker ID from the Docker for Windows menu to access your Docker Cloud account. Once logged in, you can access your Docker Cloud repositories directly from the Docker for Windows menu.

See these Docker Cloud topics to learn more:

Where to go next

Get Started – Install NavContainerHelper

Original URL…

PS C:\WINDOWS\system32> get-command -Module navcontainerhelper

CommandType Name Version Source
———– —- ——- ——
Function Backup-NavContainerDatabases navcontainerhelper
Function Compile-AppInNavContainer navcontainerhelper
Function Compile-ObjectsInNavContainer navcontainerhelper
Function Convert-ModifiedObjectsToAl navcontainerhelper
Function Convert-Txt2Al navcontainerhelper
Function Copy-FileFromNavContainer navcontainerhelper
Function Copy-FileToNavContainer navcontainerhelper
Function Create-AadAppsForNav navcontainerhelper
Function Create-AadUsersInNavContainer navcontainerhelper
Function Create-MyDeltaFolder navcontainerhelper
Function Create-MyOriginalFolder navcontainerhelper
Function Download-File navcontainerhelper
Function Enter-NavContainer navcontainerhelper
Function Export-ModifiedObjectsAsDeltas navcontainerhelper
Function Export-NavContainerDatabasesAsBacpac navcontainerhelper
Function Export-NavContainerObjects navcontainerhelper
Function Get-CompanyInNavContainer navcontainerhelper
Function Get-LocaleFromCountry navcontainerhelper
Function Get-NavContainerAppInfo navcontainerhelper
Function Get-NavContainerCountry navcontainerhelper
Function Get-NavContainerDebugInfo navcontainerhelper
Function Get-NavContainerEula navcontainerhelper
Function Get-NavContainerEventLog navcontainerhelper
Function Get-NavContainerGenericTag navcontainerhelper
Function Get-NavContainerId navcontainerhelper
Function Get-NavContainerImageName navcontainerhelper
Function Get-NavContainerIpAddress navcontainerhelper
Function Get-NavContainerLegal navcontainerhelper
Function Get-NavContainerName navcontainerhelper
Function Get-NavContainerNavUser navcontainerhelper
Function Get-NavContainerNavVersion navcontainerhelper
Function Get-NavContainerOsVersion navcontainerhelper
Function Get-NavContainerPath navcontainerhelper
Function Get-NavContainers navcontainerhelper
Function Get-NavContainerServerConfiguration navcontainerhelper
Function Get-NavContainerSession navcontainerhelper
Function Get-NavContainerSharedFolders navcontainerhelper
Function Get-NavContainerTenants navcontainerhelper
Function Get-NavVersionFromVersionInfo navcontainerhelper
Function Import-ConfigPackageInNavContainer navcontainerhelper
Function Import-DeltasToNavContainer navcontainerhelper
Function Import-NavContainerLicense navcontainerhelper
Function Import-ObjectsToNavContainer navcontainerhelper
Function Import-TestToolkitToNavContainer navcontainerhelper
Function Install-NavContainerApp navcontainerhelper
Function Install-NAVSipCryptoProviderFromNavContainer navcontainerhelper
Function Invoke-NavContainerCodeunit navcontainerhelper
Function New-CompanyInNavContainer navcontainerhelper
Function New-CSideDevContainer navcontainerhelper
Function New-DesktopShortcut navcontainerhelper
Function New-LetsEncryptCertificate navcontainerhelper
Function New-NavContainer navcontainerhelper
Function New-NavContainerNavUser navcontainerhelper
Function New-NavContainerTenant navcontainerhelper
Function New-NavContainerWindowsUser navcontainerhelper
Function Open-NavContainer navcontainerhelper
Function Publish-NavContainerApp navcontainerhelper
Function Remove-CompanyInNavContainer navcontainerhelper
Function Remove-ConfigPackageInNavContainer navcontainerhelper
Function Remove-DesktopShortcut navcontainerhelper
Function Remove-NavContainer navcontainerhelper
Function Remove-NavContainerSession navcontainerhelper
Function Remove-NavContainerTenant navcontainerhelper
Function Renew-LetsEncryptCertificate navcontainerhelper
Function Replace-NavServerContainer navcontainerhelper
Function Restart-NavContainer navcontainerhelper
Function Setup-NavContainerTestUsers navcontainerhelper
Function Start-NavContainer navcontainerhelper
Function Start-NavContainerAppDataUpgrade navcontainerhelper
Function Stop-NavContainer navcontainerhelper
Function Sync-NavContainerApp navcontainerhelper
Function Test-NavContainer navcontainerhelper
Function UnInstall-NavContainerApp navcontainerhelper
Function UnPublish-NavContainerApp navcontainerhelper
Function Wait-NavContainerReady navcontainerhelper
Function Write-NavContainerHelperWelcomeText navcontainerhelper

PS C:\WINDOWS\system32> Write-NavContainerHelperWelcomeText

Welcome to the Nav Container Helper PowerShell Prompt

Container info functions
Get-NavContainerNavVersion Get Nav version from NAV container or image
Get-NavContainerImageName Get ImageName from NAV container
Get-NavContainerGenericTag Get Nav generic image tag from NAV container or image
Get-NavContainerOsVersion Get OS version from NAV container or image
Get-NavContainerEula Get Eula link from NAV container or image
Get-NavContainerLegal Get Legal link from NAV container or image
Get-NavContainerCountry Get country version from NAV container or image
Get-NavContainerIpAddress Get IP Address to a NAV container
Get-NavContainerSharedFolders Get Shared Folders from a NAV container
Get-NavContainerPath Get the path inside a NAV container to a shared file
Get-NavContainerName Get the name of a NAV container
Get-NavContainerId Get the Id of a NAV container
Test-NavContainer Test whether a NAV container exists
Get-NavContainerDebugInfo Get Troubleshooting info for NAV container if you need help with an issue
Get-NavContainers Get All Nav Containers
Get-NavContainerEventLog Get EventLog from Nav Container
Get-NavContainerServerConfiguration Get Server Configuration from Nav Container

Container handling functions
New-NavContainer Create new Nav container
Remove-NavContainer Remove Nav container
Stop-NavContainer Stop Nav container
Start-NavContainer Start Nav container
Restart-NavContainer Restart Nav container
Import-NavContainerLicense Import License to a NAV Container
Get-NavContainerSession Create new session to a Nav container
Remove-NavContainerSession Remove Nav container session
Enter-NavContainer Enter Nav container session
Open-NavContainer Open Nav container in new window
Wait-NavContainerReady Wait for Nav Container to become ready
Copy-FileFromNavContainer Copy file from Nav Container
Copy-FileToNavContainer Copy file to Nav Container
Export-NavContainerDatabasesAsBacpac Export database(s) in Nav Container as BacPac
Backup-NavContainerDatabases Backup database(s) in Nav Container as bak

Object handling functions
Import-ObjectsToNavContainer Import objects from .txt or .fob file to Nav Container
Import-DeltasToNavContainer Merge delta files and Import objects to Nav Container
Import-TestToolkitToNavContainer Import TestToolkit to Nav Container
Compile-ObjectsInNavContainer Compile objects
Export-NavContainerObjects Export objects from Nav container
Create-MyOriginalFolder Create folder with the original objects for modified objects
Create-MyDeltaFolder Create folder with deltas for modified objects
Convert-Txt2Al Convert deltas folder to al folder
Export-ModifiedObjectsAsDeltas Export objects, create baseline and create deltas
Convert-ModifiedObjectsToAl Export objects, create baseline, create deltas and convert to .al files
Invoke-NavContainerCodeunit Invoke Codeunit in Nav Container

App handling functions
Compile-AppInNavContainer Use Container to compile App
Publish-NavContainerApp Publish App to Nav container
Sync-NavContainerApp Sync App in Nav container
Install-NavContainerApp Install App in Nav container
Uninstall-NavContainerApp Uninstall App from Nav container
Unpublish-NavContainerApp Unpublish App from Nav container
Get-NavContainerAppInfo Get info about installed apps from Nav Container
Start-NavContainerAppDataUpgrade Start Data Upgrade for an App in a Nav Container
Install-NAVSipCryptoProviderFromNavContainer Install Nav Sip Crypto Provider locally from container to sign extensions

Tenant handling functions
Get-NavContainerTenants Get all tenants in Nav Container
New-NavContainerTenant Create tenant in multitenant Nav Container
Remove-NavContainerTenant Remove tenant from multitenant Nav Container

User handling functions
Get-NavContainerNavUser Get all users in Nav Container
New-NavContainerNavUser Create new Nav User in Nav Container
New-NavContainerWindowsUser Create new Windows User in Nav Container
Setup-NavContainerTestUsers Create a set of users for test purposes

Company handling functions
Get-CompanyInNavContainer Get a list of Companies in Nav Container
New-CompanyInNavContainer Create new Company in Nav Container
Remove-CompanyInNavContainer Remove Company from Nav Container

Configuration package handling functions
Import-ConfigPackageInNavContainer Import Configuration package in Nav Container
Remove-ConfigPackageInNavContainer Remove Configuratioin package from Nav container

Azure AD specific functions
Create-AadAppsForNav Create Apps in Aad for AAD authentication support
Create-AadUsersInNavContainer Create all active users in the Aad in the Nav Container

Azure VM specific functions
Replace-NavServerContainer Replace or recreate navserver (primary) container
New-LetsEncryptCertificate Create Lets Encrypt Certificate for secure communication
Renew-LetsEncryptCertificate Renew Lets Encrypt Certificate for secure communication

Note: The Nav Container Helper is an open source project from
The project is released as-is, no warranty! Contributions are welcome, study the github repository for usage.
Report issues on

Get started – run your first NAV container

Start PowerShell ISE and run this command:

New-NavContainer -accept_eula -containerName "test" -auth NavUserPassword 
-imageName "microsoft/dynamics-nav"

to run your first NAV container using NavUserPassword authentication. PowerShell will pop up a dialog and require you to enter a username and a password to use for the container.

Note, if you are running Windows 10 , you will have to add –memory 4G as an extra parameter to the docker run command above (and in all docker run commands in this doc.)

GITHUB – Examples and use-cases for MS Dynamics NAV on Docker

Original URL…

Examples and use-cases for MS Dynamics NAV on Docker


At this moment, all examples use Docker images for MS Dynamics NAV provided by Microsoft.

Microsoft at the moment doesn`t provide the images in the public repositories (e.g. Docker Hub). Instead, there is a private repository for testing purposes only. Currently, they have been opened to give the access to the private/testing repository to anyone interested and willing to do some tests and provide a feedback. This can change at any moment I suppose.

Microsoft has recently started with publishing of the images into the official Docker Hub. Currently anyone can start using NAV on Docker. Please, read all the information in the repository to understand which version will be published in the repo, how to localize them and for what purposes you are allowed to use them. Microsoft, many thanks!!!

Also, you can visit Microsoft GitHub repository nav-docker with the source code they use to build the images. There, you can also register any issue that will appear during the testing.

It is pretty possible that some examples could fail because of the breaking changes in the sources images. Please, in this case I will appreciate your feedback (create an issue).


  • Docker has to be installed and properly configured on your Win10 / WinServer2016 (or higher) machine. Some examples will need some extra setups but those will be described for each example explicitly.
  • If you want to install Docker EE on your Windows Server you can use InstallDockerEE.ps1 script that will install Containers Windows Feature and then Docker EE. The script can be used also to upgrade your current version. It detects an existing (installed) Docker EE version present on your host and let you compare your version with the newest one available to download and install. If you confirm the new version will be downloaded and installed. This is very useful in case you are waiting for a specific Docker release and you want to check if this release has been already pushed into the repo or not.
  • By default, we will be using NAT network which is the default one configured during the Docker installation process. You can find more details about Docker networking here.
  • All examples specify NAV docker image using ${NAV_DOCKER_IMAGE} variable. This gives us some sort of flexibility in case Microsoft migrate the repository or change the name of the images, tags etc.
  • So the first step, before you run any script including docker run command, is setting the variable. For example:
# Private Microsoft Repository for NAV previews and for internal purposes.

# Official images available on Docker Hub (I will use the last W1 version):
$NAV_DOCKER_IMAGE = 'microsoft/dynamics-nav'


  • basic – This is the most elemental example. I would recommend running exactly this one at the very first moment to validate that everything is working fine. You specify the minimum of the parameters.
  • basic with user+pwd defined – Similar to the previous one but you specify user name, user pwd, container hostname, container name. There are also described some security concerns (security of the password you use). The example includes two variants.
  • winauth (shared) + VS Code – This example demonstrates shared Windows authentication. We will also see new security approach that will protect your password. This security approach is applicable to any authentication mechanism (so the WinAuth is not the only one) that requires providing a password in an explicite way.

    We will created and published ClickOnce package. And finally, we will try to connect from VS Code to the container`s dev services.

  • winauth on Docker Swarm + Secrets – One of the advanced scenarios. We will increase the security of your credentials using Docker Swarm`s Secrets. We will also talk about the scaling capabilities of the Docker Swarm. You will need to promote your docker host on the Docker Swarm node. But don`t worry, this is actually quite easy to do.
  • share data using mounts – In case you need to share (for example) add-ins between your Docker host and containers Docker Volumes would be probably the easiest way for you.
  • locally copied C/SIDE – An example that will demonstrate how to copy client folder down to your docker host to be able to access C/SIDE without installing it. You don`t need to run gMSA. Actually, I use the WinAuth hack (mentioned before) in the example.
  • gMSA – This is one of the most complex examples, it will be updated when I have some time. I am starting with the scripts, later I’ll improve them and I’ll add the documentation.

NavContainerHelper by Freddy Kristiansen

Original URL…

What are Containers? What is Docker?

If you are new to Docker and Containers, please read this document, which describes what Containers are and what Docker is.

If you want more info, there are a lot of Channel9 videos on Containers as well

If you have problems with Docker (not NAV related), the Windows Containers Docker forum is the place you can ask questions (read the readme first):

Get started – Install Docker

In order to run a NAV container, you need a computer with Docker installed, this will become your Docker host. Docker runs on Windows Server 2016 (or later) or Windows 10 Pro.

When using Windows 10, Containers are always using Hyper-V isolation with Windows Server Core. When using Windows Server 2016, you can choose between Hyper-V isolation or Process isolation. Read more about this here.

I will describe 3 ways to get started with Containers. If you have a computer running Windows Server 2016 or Windows 10 – you can use this computer. If not, you can deploy a Windows Server 2016 with Containers on Azure, which will give you everything to get started.

Windows Server 2016 with Containers on Azure

In the Azure Gallery, you will find an image with Windows Server 2016 and Docker installed and pre-configured. You can deploy this image by clicking this link.

Note, do not select Standard_D1 (simply not powerful enough) – use at least Standard_D2 or Standard_D3.

In this VM, you can now run all the docker commands, described in this document.

Windows Server 2016

Follow these steps to install Docker on a machine with Windows Server 2016.

Windows 10

Follow these steps to install Docker on Windows 10.

Get Started – Install NavContainerHelper

NavContainerHelper is a PowerShell module from the PowerShell Gallery, you can read more information about it here.

The module contains a number of PowerShell functions, which helps running and interactig with NAV containers.

On your Docker host, start PowerShell ISE and run:

install-module navcontainerhelper -force


get-command -Module navcontainerhelper

to list all functions available in the module. Use


in order to list the functions in the module grouped into areas.

Get started – run your first NAV container

Start PowerShell ISE and run this command:

New-NavContainer -accept_eula -containerName "test" 
-auth NavUserPassword -imageName "microsoft/dynamics-nav"

to run your first NAV container using NavUserPassword authentication. PowerShell will pop up a dialog and require you to enter a username and a password to use for the container.

New-NavContainer will remove existing containers with the same name before starting a new container. The container will be started as a process and the output of the function will be displayed in the PowerShell output window.

PS C:\Users\freddyk> New-NavContainer -accept_eula -containerName 
"test" -auth NavUserPassword -imageName "microsoft/dynamics-nav"
Creating Nav container test
Using image microsoft/dynamics-nav
NAV Version: 11.0.20783.0-w1
Generic Tag:
Creating container test from image microsoft/dynamics-nav
Waiting for container test to be ready
Starting Container
Hostname is test
PublicDnsName is test
Using NavUserPassword Authentication
Starting Local SQL Server
Starting Internet Information Server
Creating Self Signed Certificate
Self Signed Certificate Thumbprint 0A4F70380C95876A708018EA6883CA3A1F7FF72D
Modifying NAV Service Tier Config File with Instance Specific Settings
Starting NAV Service Tier
Creating DotNetCore NAV Web Server Instance
Creating http download site
Creating Windows user admin
Setting SA Password and enabling SA
Creating admin as SQL User and add to sysadmin
Creating NAV user
Container IP Address:
Container Hostname  : test
Container Dns Name  : test
Web Client          : http://test/NAV/
Dev. Server         : http://test
Dev. ServerInstance : NAV


Initialization took 59 seconds
Ready for connections!
Reading CustomSettings.config from test
Creating Desktop Shortcuts for test
NAV container test successfully created

The New-NavContainer will use the docker command to run the container, and will be building up the needed parameters for docker run dynamically, based on the parameters you specify to New-NavContainer.

You can also use docker run to run a container yourself

docker run -e ACCEPT_EULA=Y microsoft/dynamics-nav

Note, if you are running Windows 10 , you will have to add –memory 4G as an extra parameter to the docker run command above (and in all docker run commands in this doc.)

This will start a container with a random name, a random password, using SSL with a self-signed certificate and using admin as the username. The prompt in which you are running the command will be attached to the container and the output will be displayed. You can add a number of extra parameters to specify password, database connection, license file, configurations, etc. etc.

The docker run command created by the New-NavContainer call above will be something like:

docker run --name test `
           --hostname test `
           --env auth=NavUserPassword `
           --env username="admin" `
           --env ExitOnError=N `
           --env locale=en-US `
           --env licenseFile="" `
           --env databaseServer="" `
           --env databaseInstance="" `
           --volume "C:\ProgramData\NavContainerHelper:
             C:\ProgramData\NavContainerHelper" `
           --volume "C:\ProgramData\NavContainerHelper\Extensions\test\my:
           C:\Run\my" `
           --restart unless-stopped `
           --env useSSL=N `
           --env securePassword=<encryptedpasword> `
           --env passwordKeyFile="c:\run\my\aes.key" `
           --env removePasswordKeyFile=Y `
           --env accept_eula=Y `
           --detach `

Note, if you are running Windows 10, New-NavContainer will automatically add –memory 4G to the docker run command.

all parameters starting with –env means that docker is going to set an environment variable in the container. This is the way to transfer parameters to the NAV container. All the –env parameters will be used by the PowerShell scripts inside the container. All the non –env parameters will be used by the docker run command.

The –name parameter specifies the name of the container and the –hostname specifies the hostname of the contianer.

–volume parameters shared folders from the docker host to the container and –detach means that the container process will be detached from the process starting it.

The NAV container images supports a number of parameters and some of them are used in the above output. All of these parameters can be omitted and the NAV container image has a default behavior for them.

As you might have noticed, the New-NavContainer transfers the password to the container as an encrypted string and the key to decrypt the password is shared in a file and deleted afterwards. This allows you to use Windows Authentication with your domain credentials in a secure way.