NAV on Docker: running it on an Azure Container Instance

Post navigation

A container image is a lightweight, stand-alone, executable package of a piece of software that includes everything needed to run it: code, runtime, system tools, system libraries, settings.

I was a container user from some years, mainly for developing .NET applications for the cloud or on cross-platform environments.

I remember also that some years ago I’ve shared a document full of requests for the NAV product team and one of these was a question in order to know if a project regarding having NAV on containers was in plan for the future or not. After that, a day a man called Freddy Kristiansen comes out with the light: “we have NAV on Docker!” 🙂

Personally, actually I’m using a lot NAV on Docker containers mainly for development and demo purposes. In few minutes, you’re able to have a fully working NAV environment that runs on an isolated environment on your local system ready to go, with the NAV version (and cumulative update) you want. And you can have as many containers as you want (or as your system’s resources permits).

I’ve received questions regarding running NAV on Docker on Azure and the answer is yes, you can run the actually available NAV containers also on Azure. The easiest solution is a service called Azure Container Instances.

Azure Container Instances makes it easy to create and manage Docker containers in Azure, without having to provision virtual machines or adopt a higher-level service. An Azure Container Instance is a single container that starts in seconds and is billed by the second you use it.

The steps are really easy. From your Azure Portal, if you’ve not yet created, create a Resource Group for your container (I recommend to create one for every instace you want to run).

Then, select Azure Container Instances and click Create:

Now, set your container name (unique for Azure Region), set the Container Image to one of the available Docker container images and set the Resource Group and the Location:

Set OS type (be careful here that the default is set to Linux, you’ve to change it to Windows) and the resources (CPU cores and RAM, and IP address) for your container and click OK:

A validation will be performed and if all is ok you’re ready to deploy your NAV container to an Azure Container Instance:

After some minutes (pulling and extracting the image takes some time), your NAV container will be provisioned on Azure Container Instance and you can see it’s status and IP address directly from the Azure Portal. To access NAV, just open the browser and navigate to http://<containerIP>/nav.

You can also immediately create a NAV Container on Azure Container Instances via the Azure CLI (and this is what I prefer because it’s the quickest way to bypass all the steps previously described).From Azure Portal, launch the Cloud Shell (CLI) from the toolbar:

Create the Resource Group:

azgroupcreate --name myNAVRG --location WestEurope

After that, you can use the az container create command to create your NAV container based on the Docker image you want: