How to Use Docker Containers for Dynamics NAV

by | May 23, 2018 | Development, 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.

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

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:

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:

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:

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!

2 Comments

  1. Madan

    Thanks for this blog.
    1. Can we use AZure Sql Instance with this, instead of inside Sql?
    2. How to change license? by default microsoft license appears?

  2. Taylor Valnes

    Hello Madan,

    I’ve spoken with the blog writer and he had the following answers for you.
    1. The Docker Image was created with a local SQL EXPRESS. You would need to build a docker image that pointed to a Hosted Azure SQL Instance.
    2a. You can change the license by Opening the Development Environment and Uploading the new license.
    2b. You will need to stop and start the docker image with the following commands: “docker stop navserver” and “docker start navserver”. This will ensure that your license is running on the service tier.

    Regards,
    Taylor

Submit a Comment

Your email address will not be published. Required fields are marked *

Upcoming Events

february

27feb11:00 am12:00 pmConfab With Stoneridge - Livestream - Cool Features in Dynamics 365 Business Central

march

04mar12:00 pm12:30 pmPower BI & Reporting with Dynamics 365 Customer Engagement

04mar2:00 pm3:00 pmHow to Incorporate the Power Platform with Dynamics 365 Finance and Supply Chain Management

12mar11:00 am12:00 pmConfab With Stoneridge - Livestream - Power Apps AI Builder

18mar12:00 pm1:00 pmMoving from CRM On Prem to the Cloud – Is it worth It?

18mar2:00 pm3:00 pmThe Past, Present, and Future of Dynamics 365 with Machine Learning and Artificial Intelligence

25mar2:00 pm3:00 pmAchieve Total Data Access & Future-Proof Your Reporting

26mar11:00 am12:00 pmConfab With Stoneridge - Livestream - Portals

About Stoneridge
Stoneridge Software is a unique Microsoft Gold Partner, with emphasis on partner. With specialties in Microsoft Dynamics 365, Microsoft Dynamics AX, Microsoft Dynamics NAV, Microsoft Dynamics GP and Microsoft Dynamics CRM, we focus on attracting the most knowledgeable experts in the field to our team, and prioritize delivering stellar solutions with maximum impact for your business. At Stoneridge, we are deeply committed to your results. Each engagement is met with a dedicated team, ready to provide thorough, tailored, and expert service. Based in Minnesota, we intentionally “step into your shoes,” wherever you are. We focus on what you care about, and develop trusting, long-term relationships with our clients.

Subscribe To Our Blog

Sign up to get periodic updates on the latest posts.

Thank you for subscribing!

X