Volodymyr Dvernytskyi
Personal blog about Navision & Dynamics 365 Business Central
results count:
post cover

Business Central Docker: Quick Start Guide

There are already many detailed guides on how and why we can use Docker to emulate Business Central on both OnPrem and Cloud versions. But I wrote short instructions, according to which you can quickly recall any command that you forgot and refresh your memory. Also, this information will help beginners who still do not understand why all this is needed.

Quick Guide

Install Docker

Go to https://www.docker.com/get-started and download Docker Desktop application. Install it.

Enable Hyper-V

Go to Windows PowerShell (run as Administrator) and run the command to enable Hyper-V:

Enable-WindowsOptionalFeature -Online -FeatureName $("Microsoft-Hyper-V", "Containers") -All

Install BcContainerHelper

Put command into PowerShell:

Install-Module BcContainerHelper -Force

If you get an error, install PowerShell package manager:

Install-Module -Name PowerShellGet -Repository PSGallery -Force

Reboot PC

Reboot is required due to Hyper-V installation.

Switch to Windows Docker

Go to Windows right bottom corner, find Docker icon, right-click and select "Switch to Windows containers".

Get Artifact Url

To start BC installation process you must find Artifact Url for your specific BC version. Put command in PowerShell:

Get-BcArtifactUrl -type sandbox -country us -select Latest

Parameters (for reference, choose what you need):

-type    sandbox or onprem
-country BC localization
-select  your specific version or Latest

If you have an error "that script is not signed" change PS script execution policy:

Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Force -Scope LocalMachine

Download and Install BC image

Put command in PowerShell:

New-BCContainer -includeAL -containerName {SandboxName} -accept_eula -auth NavUserPassword -ACCEPT_OUTDATED -artifactUrl {artifactUrl} -updateHosts -includeTestToolkit -includeTestLibrariesOnly -assignPremiumPlan

Set username and password

In the installation process, you will have a pop-up window where you must type your new UserName and Password. Password must contain lowercase and uppercase, number, and symbol.

We have installed the Docker and BC Image version we need. Pay attention to the shortcuts created during the installation; with them you can access the base and consoles of the images.

Links

This short note will not be enough to deep work with the docker and BC Artifact, so I decided to compile a list of useful resources on this topic.

Link Description
https://freddysblog.com/ You really don't know this blog?
https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/devenv-running-container-development Official Microsoft documentation
https://ricardopaiva.github.io/cheatsheet/ Good unofficial documentation
https://demiliani.com/category/docker/ Docker and more
https://www.waldo.be/tag/docker/ Docker and more
Back to top