Thursday, April 20, 2023

Configure Business Central Container in Docker

How we can configure the latest Business Central container as Sandbox in docker without License file?


Step 1: Download the Docker by clicking on Docker Desktop for Windows button and install.
https://docs.docker.com/desktop/install/windows-install/


Installation Process:


Step 2: Restart the computer and Go to Windows right bottom corner, find Docker icon, right-click and select "Switch to Windows containers".


Step 3: Open PowerShell ISE with run as administrator and run below script. 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.


PowerShell ISE Script:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned
Install-Module BcContainerHelper -Force -AllowClobber

#set accept_eula to $true to accept the eula found here: https://go.microsoft.com/fwlink/?linkid=861843

$containername = "DockerBC"
$imagename = "bccontainer22"
$credential = Get-Credential -Message 'Using UserPassword authentication. Please enter credentials for the container.'
$artifactUrl = Get-BCArtifactUrl -type sandbox -version 22.0.54157.55343 -country w1  -select Closest

New-BCContainer `
    -accept_eula  `
    -containerName $containername `
    -credential $credential `
    -artifactUrl $artifactUrl `
    -imageName $imagename `
    -memoryLimit 4G `
    -auth NavUserPassword `
    -shortcuts Desktop `
    -updateHosts `
    -assignPremiumPlan `
    -doNotCheckHealth `
    -accept_outdated `
    -includeAL `
    -isolation hyperv

Step 4: You’ll get the Web Client URL and other information response.


Login Screen: Use the Credential which you have entered while configuration process.


  • Business Central Container is ready to use.