Business central blog
Subscribe to blog and get news about new posts.

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

  1. Install Docker
    Go to https://www.docker.com/get-started and download docker desktop application. Install it.
  2. Enable Hyper-V
    Go to Windows PowerShell, run it as administrator, put command to enable Hyper-V:
    Enable-WindowsOptionalFeature -Online -FeatureName $("Microsoft-Hyper-V", "Containers") -All
  3. Install BcContainerHelper
    Put command into PowerShell:
    Install-Module BcContainerHelper -force
    If you got an error just install PowerShell package manager, put command into PowerShell:
    Install-Module -Name PowerShellGet -Repository PSGallery -Force
  4. Reboot PC
    Reboot is required due to Hyper-V installation
  5. Switch to Windows Docker
    Go to Windows right bottom corner, find Docker icon, right-click and select "Switch to Windows containers"
  6. Get Artifact Url
    To start BC installation process you must find Artifact Url for your specific BC version, just put command in PowerShell:
    Get-BcArtifactUrl -type sandbox -country us -select Latest
    -type sandbox or onprem
    -country BC localization
    -select your specific version or
    Latest
    If you have an error "that script is not signed" you need just to change PS script execution policy by command:
    Set-ExecutionPolicy -ExecutionPolicy Unrestricted -force -scope LocalMachine
  7. 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
  8. 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.
SATURDAY, August 14, 2021