Overview
Running Microsoft Dynamics 365 Business Central in Docker containers provides rapid deployment, isolated environments, and consistent setups for development, testing, and demonstrations without affecting production systems.
Who Should Use This Guide:
- AL extension developers needing sandbox environments
- QA teams testing Business Central customizations
- Consultants creating demo environments
- DevOps engineers building CI/CD pipelines for BC
Why Docker for Business Central:
| Benefit | Description |
|---|---|
| Rapid Deployment | Fresh BC environment in 15-30 minutes |
| Cost Savings | No Azure or on-premises licenses for dev sandboxes |
| Isolation | Each developer can have independent environment |
| Reproducibility | Consistent environments from scripts |
| Version Testing | Run multiple BC versions simultaneously |
Requirements
System Requirements:
| Component | Requirement |
|---|---|
| Operating System | Windows 10/11 Pro or Windows Server with Hyper-V |
| RAM | 16GB minimum, 32GB+ recommended |
| Disk Space | 30GB+ free (container images are large) |
| Docker | Native Docker Engine or Docker Desktop |
| PowerShell | Version 5.1 or later |
Prerequisites:
| Prerequisite | Purpose |
|---|---|
| Hyper-V | Windows container isolation |
| Containers Feature | Windows container support |
| BcContainerHelper | PowerShell module for BC containers |
| Internet Access | Download BC artifacts and images |
Architecture
┌─────────────────────────────────────────────────────────────┐
│ Windows Host │
│ │
│ ┌────────────────────────────────────────────────────────┐ │
│ │ Docker Engine │ │
│ │ │ │
│ │ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │ │
│ │ │ bcserver-25 │ │ bcserver-26 │ │ bcserver-27 │ │ │
│ │ │ (BC 25) │ │ (BC 26) │ │ (BC 27) │ │ │
│ │ │ │ │ │ │ │ │ │
│ │ │ Web Client │ │ Web Client │ │ Web Client │ │ │
│ │ │ SQL Server │ │ SQL Server │ │ SQL Server │ │ │
│ │ │ NST │ │ NST │ │ NST │ │ │
│ │ └─────────────┘ └─────────────┘ └─────────────┘ │ │
│ │ │ │
│ └────────────────────────────────────────────────────────┘ │
│ │
│ ┌─────────────────────────────────────────────────────────┐│
│ │ BC Container Manager ││
│ │ [Dashboard] [Create] [Backups] [Troubleshoot] ││
│ └─────────────────────────────────────────────────────────┘│
└─────────────────────────────────────────────────────────────┘Process
Step 1: Install BcContainerHelper Module
Install the PowerShell module for managing BC containers.
Installation Command:
# Install BcContainerHelper
Install-Module BcContainerHelper -Force
# Import the module
Import-Module BcContainerHelper
# Verify installation
Get-Command -Module BcContainerHelper | Measure-ObjectExpected Result: Module installed with 100+ commands available.
Update to Latest Version:
# Update to latest version
Update-Module BcContainerHelper -ForceStep 2: Create Business Central Container
Deploy a BC container with the desired version.
List Available BC Versions:
# List available BC artifacts
Get-BCArtifactUrl -type Sandbox -country us -select Latest
Get-BCArtifactUrl -type Sandbox -country us -version "25"Create the Container:
# Define container parameters
$containerName = "bcserver-dev"
$credential = Get-Credential -Message "Enter BC Admin credentials"
# Get artifact URL for latest BC
$artifactUrl = Get-BCArtifactUrl -type Sandbox -country us -select Latest
# Create the container
New-BcContainer `
-containerName $containerName `
-artifactUrl $artifactUrl `
-credential $credential `
-accept_eula `
-updateHosts `
-auth NavUserPassword `
-includeTestToolkit `
-includeTestLibrariesOnlyExpected Timeline: 15-30 minutes for first deployment (image download).
Available Container Options:
| Parameter | Description |
|---|---|
-artifactUrl | BC version to deploy |
-auth | Authentication mode (NavUserPassword, Windows) |
-includeTestToolkit | Include test libraries for AL development |
-updateHosts | Add container to hosts file |
-isolation | Container isolation (hyperv, process) |
Step 3: Access Business Central
Connect to the deployed Business Central instance.
Get Container Information:
# List running BC containers
docker ps --filter "name=bc"
# Get container URLs
Get-BcContainerUrl -containerName "bcserver-dev"Service URLs:
| Service | URL Pattern |
|---|---|
| Web Client | https://<container-name>/BC/ |
| SOAP Services | https://<container-name>:7047/BC/WS/ |
| OData Services | https://<container-name>:7048/BC/ODataV4/ |
| Dev Services | https://<container-name>:7049/BC/dev/ |
Authentication:
- Use credentials specified during container creation
- For Windows auth, use domain credentials
Step 4: Manage Containers
Common container management operations.
Start, Stop, and Restart Containers:
# Stop container
Stop-BcContainer -containerName "bcserver-dev"
# Start container
Start-BcContainer -containerName "bcserver-dev"
# Restart container
Restart-BcContainer -containerName "bcserver-dev"View Container Event Logs:
# Get container event log
Get-BcContainerEventLog -containerName "bcserver-dev"
# Stream Docker logs
docker logs -f "bcserver-dev"Remove a Container:
# Remove container (preserves image)
Remove-BcContainer -containerName "bcserver-dev"Step 5: Backup and Restore
Protect your development work with backups.
Create Database Backup:
# Backup container database
Backup-BcContainerDatabases -containerName "bcserver-dev" -bakFolder "C:\BCBackups"Restore from Backup:
# Restore from backup
Restore-BcContainerDatabases -containerName "bcserver-dev" -bakFile "C:\BCBackups\bcserver-dev.bak"Automated Daily Backup Script:
# Schedule daily backup
$containerName = "bcserver-dev"
$backupPath = "C:\BCBackups"
$date = Get-Date -Format "yyyyMMdd"
Backup-BcContainerDatabases `
-containerName $containerName `
-bakFolder $backupPath
# Rename with date
Get-ChildItem "$backupPath\*.bak" | ForEach-Object {
$newName = $_.BaseName + "-$date" + $_.Extension
Rename-Item $_.FullName -NewName $newName
}
# Keep only last 7 backups
Get-ChildItem "$backupPath\*.bak" |
Sort-Object LastWriteTime -Descending |
Select-Object -Skip 7 |
Remove-Item -ForceStep 6: Deploy AL Extensions
Install custom extensions into the container.
Publish an Extension File:
# Publish .app file
Publish-BcContainerApp `
-containerName "bcserver-dev" `
-appFile "C:\Projects\MyExtension\output\MyExtension.app" `
-skipVerification `
-sync `
-installCompile from AL Source and Publish:
# Compile AL project
Compile-AppInBcContainer `
-containerName "bcserver-dev" `
-appProjectFolder "C:\Projects\MyExtension" `
-appOutputFolder "C:\Projects\MyExtension\output"
# Then publish as aboveBC Container Manager Application
For a graphical interface to manage BC containers, consider the BC Container Manager desktop application.
Features:
| Feature | Description |
|---|---|
| Dashboard | View all BC containers at a glance |
| One-Click Deployment | Create containers with version selection |
| Backup Management | Create and restore container backups |
| Log Viewer | Real-time container log streaming |
| AI Troubleshooting | Claude-powered issue diagnosis |
Quick Start:
- Download from GitHub releases
- Run installer or portable executable
- Configure settings (backup path, optional AI key)
- Click "New Container" to deploy BC
Application Capabilities:
The BC Container Manager is an Electron + Next.js desktop application that provides:
- Container lifecycle management (start, stop, restart, remove)
- Version selection (BC 13-27, Latest, Preview)
- Automated backup scheduling
- Real-time log viewing
- AI-powered troubleshooting assistance
Troubleshooting
Common Issues:
| Symptom | Possible Cause | Solution |
|---|---|---|
| Container won't start | Hyper-V not enabled | Enable Hyper-V and Containers features |
| Port conflicts | Another container using ports | Stop conflicting containers or use different ports |
| Out of memory | Insufficient RAM | Close other applications, increase VM memory |
| Image pull fails | Network/registry issue | Check internet connectivity, retry |
| Web client 404 | Container not fully started | Wait for container to complete initialization |
Diagnostic Commands:
# Check container status
docker ps -a --filter "name=bc"
# Check container health
docker inspect bcserver-dev --format='{{.State.Health.Status}}'
# View container logs
docker logs bcserver-dev --tail 100
# Check Docker service
Get-Service docker
# List BC containers with details
Get-BcContainers | Format-Table Name, Image, StateCommon HNS Errors (Windows 11):
If you encounter HNS (Host Network Service) errors like 0x803b0013:
# Stop Docker and HNS services
Stop-Service docker
Stop-Service hns
# Clean up orphaned endpoints
Get-HnsEndpoint | Where-Object { $_.State -eq "Orphaned" } | Remove-HnsEndpoint
# Restart services
Start-Service hns
Start-Service dockerVerification Checklist
Pre-Deployment:
- Docker Engine installed and running
- Hyper-V and Containers features enabled
- BcContainerHelper module installed
- Sufficient RAM and disk space
Post-Deployment:
- Container shows as running
- Web Client accessible
- Login with credentials succeeds
- Container added to hosts file
Development Ready:
- Test toolkit installed (if needed)
- AL extension development services available
- Backup strategy configured
- VS Code connected to container
Multiple Version Management
Run multiple BC versions simultaneously for testing.
Version-Based Port Allocation:
| BC Version | Web Client Port | Services Port |
|---|---|---|
| BC 25 | 8025 | 7047-7049 |
| BC 26 | 8026 | 7147-7149 |
| BC 27 | 8027 | 7247-7249 |
Create Multiple Version Containers:
# BC 25 (LTS)
New-BcContainer -containerName "bcserver-bc25" `
-artifactUrl (Get-BcArtifactUrl -version "25" -type Sandbox -country us) `
-credential $credential -accept_eula
# BC 27 (Current)
New-BcContainer -containerName "bcserver-bc27" `
-artifactUrl (Get-BcArtifactUrl -version "27" -type Sandbox -country us) `
-credential $credential -accept_eulaReferences
Last Updated: February 2026