How to Use Docker Containers for Dynamics NAV

By Matt Sharp | May 23, 2018

How to use docker containers for dynamics nav

Wondering how to use Docker Containers for Dynamics NAV? The first step on getting started with Docker Containers is selecting the Docker Container Tag from this list at hub.docker.com. This will be used in the place of <ReplaceWithDockerTag>.

Next Open Portal.azure.com – Click on Cloud Shell Icon

Docker Containers

If you have never used Cloud Shell, you can find a great Overview of Azure Cloud Shell here.

Next, Create a Storage Account, if you do not have one already.

Docker Containters

For our examples, we will Run Cloud Shell – Bash (You may need to change from PowerShell).

Docker Containers

If this is your first time Creating an Azure Container, you will need to first Create Resource Group. This only has to be run once.

az group create --name DockerContainersNAV--location eastus

Now, for the moment we have all been waiting for!  Let’s Create a Docker Container!

az container create --name <ReplaceWithDockerTag> --image microsoft/dynamics-nav:<ReplaceWithDockerTag> --resource-group DockerContainersNAV --os-type Windows --cpu 2 --memory 3 --environment-variables ACCEPT_EULA=Y --ip-address public --port 443 1433 7046 7049 8080

Let it run for 10-15 Minutes – Provisioning times for Docker Containers may vary ?

If you are impatient and want to check the Provisioning State status now, run the following command:

az container show --resource-group DockerContainersNAV--name <ReplaceWithDockerTag>

Docker Containers

Once the Azure Container is finished the “provisioningState” will be “Succeeded”.

Docker Containers

Now that your Docker Container is running, you need to look at the details of what you just created.

You will need to run the following command:

az container logs --resource-group DockerContainersNAV --name <ReplaceWithDockerTag>

Docker Containers

Make note of the Following:
• NAV Admin Username
• NAV Admin Password
• Container DSN Name
• Certificate.cer URL

Next, you will need to find the Public IP Address by Searching for the Container Group you created with the <ReplaceWithDockerTag>

Docker Containers

Now for the tricky part.  You will need to use the Poor Man’s DNS, because the DNS that the Docker Container created is just random Hex Values. To do this, navigate to the following:

C:\Windows\System32\Drivers\ETC\

You will see a file Named Host without any extension. Right Click on the file and Open with Notepad Editor

Docker Containers

Add the Public IP Address, then a space, then the Container DSN Name.

Docker Containers

Save the file and make sure it doesn’t have an extension. The file name should just be host’s.

You can test your Poor Man’s DNS by navigating to the Certificate.cer URL:

http://<ReplaceWithContainerDNSName>:8080/certificate.cer

Docker Containers

You will download the Certificate.cer and install in the Trusted Publishers Certificate Store.

Docker Containers

Docker Containers

Now you are ready to Navigate to the Web Client

https://<ReplaceWithContainerDNSName>/nav

You will use the NAV Admin Username and NAV Admin Password you got with the logs command:

az container logs --resource-group DockerContainersNAV --name <ReplaceWithDockerTag>

Docker Containers

But what about the DEV Client?  You will need to add some special syntax to connect:

Docker Containers

  1. You will need to enter tcp:<ReplaceWithContainerDNSName>\nav,1433
  2. Change Authentication to Database Server Authentication
  3. User ID will be sa – SQL Admin
  4. Password: will be the NAV Admin Password
  5. Select the Database Name CronusNA

You are ready for DEV in your new Azure Docker Container!

Related Posts

Recommended Reading:

5.27.22 Dynamics GP

How to Run Drop Ship Sales in Dynamics GP

Need to Invoice the Customer before you get the invoice from the vendor? This The freight forwarder has contacted you […]

Read the Article

New Features in Dynamics 365 Business Central 2022 Wave 1 Release – Protecting G/L Accounts From Being Deleted

There are a lot of exciting New Features in Dynamics 365 Business Central 2022 Wave 1 Release to get excited […]

Read the Article
5.25.22 Financials

Rounding Numbers in Power Automate

  If you’ve ever tried to round numbers in Power Automate, you have probably already run into the issue there […]

Read the Article

Manage U.S. Use Tax on Purchase Orders in Dynamics 365 Finance and Operations

  Managing sales tax requirements on your business purchase can be complicated, but Dynamics 365 Finance and Operations can help […]

Read the Article
5.19.22 Dynamics CRM

How to Write a Great Support Ticket in the Stoneridge Support Portal

Submitting a support ticket through the Stoneridge Support Portal is a quick and effective way to get assistance for any […]

Read the Article

Managing Your Business Through Uncertain Times Using Dynamics 365 Finance and Operations

  Dynamics 365 Finance and Operations (F&O) can help you make informed decisions on how to move your business forward. […]

Read the Article
5.13.22 Power Platform

Using Power BI Object Level Security

  The following article will demonstrate how to use Power BI Object Level Security to disable column data based on […]

Read the Article
5.12.22 Dynamics CRM

How to Use the Stoneridge Support Portal

Stoneridge Software’s support portal is an intuitive and useful function that makes it easy for you to access resources to […]

Read the Article
5.6.22 Dynamics GP

Dynamics GP Transaction Removal: Purchase Orders

  Are you having performance issues with Purchase Orders?  Do you find that there are old Purchase Orders on your […]

Read the Article

Start the Conversation

It’s our mission to help clients win. We’d love to talk to you about the right business solutions to help you achieve your goals.

Subscribe To Our Blog

Sign up to get periodic updates on the latest posts.

Thank you for subscribing!

X