{"id":17972342,"url":"https://github.com/microsoft/navcontainerhelper","last_synced_at":"2025-04-14T06:06:31.924Z","repository":{"id":37706205,"uuid":"104932805","full_name":"microsoft/navcontainerhelper","owner":"microsoft","description":"Official Microsoft repository for BcContainerHelper, a PowerShell module, which makes it easier to work with Business Central Containers on Docker.","archived":false,"fork":false,"pushed_at":"2025-04-14T05:40:21.000Z","size":13777,"stargazers_count":410,"open_issues_count":154,"forks_count":250,"subscribers_count":49,"default_branch":"main","last_synced_at":"2025-04-14T06:06:26.763Z","etag":null,"topics":["docker","microsoft","msdyn365bc","powershell"],"latest_commit_sha":null,"homepage":"","language":"PowerShell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/microsoft.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-09-26T20:11:04.000Z","updated_at":"2025-04-13T18:39:57.000Z","dependencies_parsed_at":"2024-01-05T08:23:40.456Z","dependency_job_id":"56d095b7-cd9e-4b09-b697-09ea03ab37ea","html_url":"https://github.com/microsoft/navcontainerhelper","commit_stats":{"total_commits":3090,"total_committers":118,"mean_commits":26.1864406779661,"dds":0.4559870550161812,"last_synced_commit":"d44c7e728de7c6cdb45d8ba39418100402e03869"},"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microsoft%2Fnavcontainerhelper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microsoft%2Fnavcontainerhelper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microsoft%2Fnavcontainerhelper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microsoft%2Fnavcontainerhelper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/microsoft","download_url":"https://codeload.github.com/microsoft/navcontainerhelper/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248830397,"owners_count":21168272,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","microsoft","msdyn365bc","powershell"],"created_at":"2024-10-29T16:12:31.581Z","updated_at":"2025-04-14T06:06:31.891Z","avatar_url":"https://github.com/microsoft.png","language":"PowerShell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BcContainerHelper\n\nBcContainerHelper is a PowerShell module designed to simplify the management of Business Central and Dynamics NAV containers on Docker. As a work-in-progress project, it welcomes contributions through pull requests and ideas. Comprehensive documentation is available in the [NavContainerHelper.md](NavContainerHelper.md).\n\n# Getting Started\n\nThere are two primary methods for running these Docker containers: as a [VM on Azure](#vm-on-azure) or [locally](#local-installation).\n\nUsing a **VM on Azure** provides a ready-to-go environment within approximately 30 minutes, eliminating the need for manual installation. If you have Azure credits as part of a Visual Studio subscription, you can use them for these VMs, making it a cost-effective option.\n\nWhile **local installation** requires more initial setup, it offers a fully configured local environment where you can work with Business Central containers even offline.\n\n## VM on Azure\n\nTo set up a VM on Azure, follow the steps provided at [aka.ms/getbc](https://aka.ms/getbc).\n\n## Local Installation\n\nLocal installation depends on whether you use [Windows 10 or 11](#local-installation-on-windows-10-or-11) or [Windows Server](#local-installation-on-windows-server).\n\nYou can choose between Hyper-V isolation or Process isolation:\n\n| Feature                        | Hyper-V Isolation                                                      | Process Isolation                                             |\n|--------------------------------|------------------------------------------------------------------------|----------------------------------------------------------------|\n| **Isolation Level**            | High: Uses a separate hypervisor-based virtual machine                 | Moderate: Uses namespace and resource control to isolate containers within the same OS instance |\n| **Performance**                | Lower: Due to the overhead of running a full VM                        | Higher: Less overhead, as it runs directly on the host OS kernel  |\n| **Compatibility**              | Can run different OS versions from the host                            | Limited to running containers that share the same OS and kernel version as the host |\n| **Resource Requirements**      | Higher: Requires more CPU and memory due to full VM overhead           | Lower: More efficient use of CPU and memory resources           |\n| **Startup Time**               | Slower: Takes longer to start due to VM initialization                 | Faster: Quick startup as it leverages the host OS directly      |\n| **Host OS Requirements**       | Requires Windows or Windows Server with Hyper-V enabled                | Requires Windows or Windows Server with container support enabled |\n\nIf you can use Process isolation, choose Hyper-V only if necessary due to compatibility issues like using Windows 10.\n\nFor more details on setting up your environment, visit the [official documentation](https://learn.microsoft.com/en-us/virtualization/windowscontainers/quick-start/set-up-environment).\n\n### Local Installation on Windows 10 or 11\n\nYou can choose between Docker Desktop and installing the Docker Engine via PowerShell.\n\nBefore installing Docker, ensure your system meets the following requirements:\n- Windows 11 Pro, Enterprise, or Education edition.\n- Recommended minimum of 16 GB memory (more is better for running multiple containers simultaneously).\n\nFor Hyper-V:\n- More memory is recommended as the whole OS runs inside the Docker container VMs.\n- A 64-bit processor with Second Level Address Translation (SLAT).\n- CPU support for VM Monitor Mode Extension (VT-c on Intel CPUs). Enable hardware virtualization support in the BIOS settings.\n\n#### 1.a Install Docker Desktop\n\n**Note:** Docker Desktop may require a license. Please review the licensing rules before installing and also check out the [System Requirements](https://docs.docker.com/desktop/install/windows-install/#system-requirements).\n\nDownload and install Docker Desktop from [docker.com](https://docs.docker.com/desktop/install/windows-install). It will install the Windows Features Containers and Hyper-V.\n\nBy default, the Windows Subsystem for Linux (WSL) is enabled, which runs Linux instead of Windows containers.\n\nDuring installation, set the default container type to Windows containers. To switch after installation, open the system tray, right-click on the Docker icon, and select **Switch to Windows containers...**.\n\nFor more details, visit this [Microsoft guide](https://learn.microsoft.com/en-us/virtualization/windowscontainers/quick-start/set-up-environment?tabs=dockerce#windows-10-and-11-1).\n\n#### 1.b Alternative: Install Docker Engine using PowerShell\n\nInstall the Windows Feature Containers and optionally Hyper-V.\n\n1. **Open Control Panel:**\n   - Press `Win + R` to open the Run dialog box.\n   - Type `Control Panel` and press `Enter`.\n\n2. **Navigate to Programs and Features:**\n   - In the Control Panel, click on `Programs`.\n   - Under `Programs and Features`, click `Turn Windows features on or off`.\n\n3. **Enable Containers:**\n   - In the Windows Features dialog, scroll down and locate `Containers`.\n   - Check the box next to `Containers` to enable it.\n\n3. **(Optionally) Enable Hyper-V:** \n   - In the Windows Features dialog, scroll down and locate `Hyper-V`.\n   - Check the box next to `Hyper-V` to enable it.\n\n4. **Apply Changes and Restart:**\n   - Click `OK` to apply the changes.\n   - Windows will begin installing Containers and Hyper-V, which might take a few minutes.\n   - After the installation is complete, you will be prompted to restart your computer. Click `Restart now` to complete the installation.\n\nYour computer will restart.\n\nRun PowerShell as an administrator:\n```PowerShell\nInvoke-WebRequest -UseBasicParsing -Uri 'https://raw.githubusercontent.com/microsoft/nav-arm-templates/main/InstallOrUpdateDockerEngine.ps1' -OutFile (Join-Path $ENV:TEMP 'installOrUpdateDocker.ps1')\n. (Join-Path $ENV:TEMP 'installOrUpdateDocker.ps1')\n```\n\n#### 2. Install BcContainerHelper\n\nRun PowerShell as an administrator:\n```PowerShell\nInstall-PackageProvider -Name NuGet -Force\nInstall-Module BcContainerHelper -Force\nSet-ExecutionPolicy -ExecutionPolicy RemoteSigned\n```\n**Note:** On Windows 11, you also need to allow running modules with `Set-ExecutionPolicy -ExecutionPolicy RemoteSigned`. For more details, see [this link](https://go.microsoft.com/fwlink/?LinkID=135170).\n\n#### 3. Create Your First Container\n\nRun PowerShell as an administrator:\n```PowerShell\n$url = Get-BCArtifactUrl -Select Latest -Type OnPrem -Country w1\n$cred = Get-Credential\nNew-BcContainer -accept_eula -artifactUrl $url -Credential $cred -auth UserPassword\n```\n\nWith these steps, you should be able to set up your environment and start using BcContainerHelper to create and manage Business Central containers on Docker.\n\n### Local Installation on Windows Server\n\n#### 1. Install Docker\n\nBefore installing Docker, ensure your system meets the following requirements:\n- Windows Server 2016, 2019, or 2022 Standard or Datacenter Edition.\n- Recommended minimum of 16 GB memory (more is better for running multiple containers simultaneously).\n\nFor Hyper-V:\n- More memory is recommended as the whole OS runs inside the VM.\n- A 64-bit processor with Second Level Address Translation (SLAT).\n- CPU support for VM Monitor Mode Extension (VT-c on Intel CPUs). Enable hardware virtualization support in the BIOS settings.\n\nRun PowerShell as an administrator:\n```PowerShell\nInstall-WindowsFeature Containers -Restart\n```\nIf you want to use Hyper-V, run `Install-WindowsFeature Hyper-V, Containers -Restart` instead. More details on using Hyper-V can be found in the [Business Central Generic Images](#business-central-generic-images) section.\n\nYour computer will restart.\n\nRun PowerShell as an administrator:\n```PowerShell\nInvoke-WebRequest -UseBasicParsing -Uri 'https://raw.githubusercontent.com/microsoft/nav-arm-templates/main/InstallOrUpdateDockerEngine.ps1' -OutFile (Join-Path $ENV:TEMP 'installOrUpdateDocker.ps1')\n. (Join-Path $ENV:TEMP 'installOrUpdateDocker.ps1')\n```\n\n#### 2. Install BcContainerHelper\n\nRun PowerShell as an administrator:\n```PowerShell\nInstall-PackageProvider -Name NuGet -Force\nInstall-Module BcContainerHelper -Force\n```\n\n#### 3. Create Your First Container\n\nRun PowerShell as an administrator:\n```PowerShell\n$url = Get-BCArtifactUrl -Select Latest -Type OnPrem -Country w1\n$cred = Get-Credential\nNew-BcContainer -accept_eula -artifactUrl $url -Credential $cred -auth UserPassword\n```\n\nWith these steps, you should be able to set up your environment and start using BcContainerHelper to create and manage Business Central containers on Docker.\n\n### Business Central Generic Images\n\nBusiness Central Generic images are named `mcr.microsoft.com/businesscentral:osversion`, where `osversion` is the version of the Operating System.\n\nBcContainerHelper attempts to find the best matching generic image for your OS. A new generic image is created monthly for all supported long-term servicing channels (LTSC). Currently, this includes three images:\n- `mcr.microsoft.com/businesscentral:ltsc2016`\n- `mcr.microsoft.com/businesscentral:ltsc2019`\n- `mcr.microsoft.com/businesscentral:ltsc2022`\n\nThese images will also be tagged with the `osversion`, but BcContainerHelper's `Get-BestGenericImage` will (by default) always return one of the three images above.\n- Windows 10 will always get `ltsc2019` and will need Hyper-V isolation to run these.\n- Windows 11 will always get `ltsc2022` and can still run process isolation.\n- Windows Server 2019 can run process isolation with a matching image.\n- Windows Server 2022 can run process isolation with the latest image\n# Branches\n\n**NavContainerHelper** is the main branch for the NavContainerHelper PowerShell module on PowerShell Gallery. **NavContainerHelper** is no longer supported.\n\n**main** is the main branch for the BcContainerHelper PowerShell module on PowerShell Gallery. **BcContainerHelper** will from August 1st 2020 ship as release and pre-release.\n\nPlease report issues in the issues list.\n\n# Contributing\n\nThis project welcomes contributions and suggestions.  Most contributions require you to agree to a\nContributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us\nthe rights to use your contribution. For details, visit https://cla.microsoft.com.\n\nWhen you submit a pull request, a CLA-bot will automatically determine whether you need to provide\na CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions\nprovided by the bot. You will only need to do this once across all repos using our CLA.\n\nThis project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).\nFor more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or\ncontact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmicrosoft%2Fnavcontainerhelper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmicrosoft%2Fnavcontainerhelper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmicrosoft%2Fnavcontainerhelper/lists"}