Docker and Business Central

Over the last few months, there has been quite a few blog posts and discussions on social media based on blogs posts from Docker, Microsoft and Mirantis indicating new pricing structure. In this blog post I will try to make the options for running Business Central on Docker clear.

The two major products used for running Business Central containers are Docker Desktop and Mirantis Container Runtime (formerly known as Docker Engine – Enterprise). Both products include Docker Engine and adds a number of additional components and features which might be relevant for you. Docker Engine can however also be installed alone and is sufficient for running BcContainerHelper and the Business Central Generic image.

This blog post will NOT just tell you how to install Docker Engine, as that might not be the right option for you. Instead, I will walk through the different options you have and you will have to decide on what is best for you.

Docker Desktop

On August 31st, Docker announced updated product subscriptions, which means that for companies with more than 250 employees using Docker and companies with a revenue of more than 10mio US$, Docker Desktop is no longer free, but will have a per user pricing. Docker Desktop Subscription overview can be found here. The new subscription includes a grace period until January 31st 2022, after which you need to conform to the new licensing rules or uninstall Docker Desktop.

Official installation instructions for Docker Desktop can be found here.

For most people running Windows Desktop, I recommend using Docker Desktop. Even It comes with an installer and a nice GUI with some tools for helping you out if Docker acts out.

Personally, I am subject to the licensing cost (Microsoft does have slightly more than 250 employees AND we have slightly more than $10mio in revenue) and even though I do not see $5 a month as a problem for using an amazing tool like Docker Desktop, I right now do not have a way to pay as the licensing will be calculated for all of Microsoft.

If Microsoft signs an enterprise agreement of some kind with Docker before January 31st, I will re-install Docker Desktop. Until then, I will be installing Docker Engine on my machine.

A comparison between Docker Desktop and Docker Engine can be found here.

Mirantis Container Runtime (formerly Docker Engine – Enterprise)

Shortly after, on September 27th, Microsoft announced that support for Mirantis Container Runtime (formerly known as Docker Engine – Enterprise) will transition to Mirantis support services. On the same day, Mirantis acknowledged this and mentioned a pricing structure for Mirantis Container Runtime and indicating that support for this would not be included in standard pricing and would be subject to additional pricing. Pricing is currently in beta and might be subject to change.

Microsoft will no longer maintain the MicrosoftDockerProvider repository, which then also means that the DockerMsftProvider PowerShell module will no longer be supported and if you are using this module, you will need to find a different way of installing Docker.

Official installation instructions for Mirantis Container Runtime can be found here.

Mirantis Container Runtime is positioned as enterprise scale container runtime and are primarily focusing on functionality targeting this segment. I have used Docker Engine – Enterprise on Windows Server, but primarily because it was available using the DockerMsftProvider PowerShell module and it was free on Windows Server.

I do not see a problem in the pricing model of Mirantis Container Runtime. In fact, I think it is a very good deal if you are using any of the components Mirantis Container Runtime provides. BcContainerHelper and the Business Central generic image isn’t utilizing any of the added functionality provided in Mirantis Container Runtime and going forward, I will be installing Docker Engine on Windows Server.

Docker Engine

Docker Engine consists of Docker Daemon and Docker CLI (Command Line Interface). Both projects are Open Source, licensed under the Apache 2.0 license. Note that Docker Engine doesn’t come with a support plan. If you need a support plan, you need Docker Desktop or Mirantis Container Runtime.

The binaries for Docker Engine can be downloaded from Docker here.

Looking at the Docker binaries, the .zip files basically consists of two files. Docker.exe (CLI) and DockerD.exe (Daemon). If you want to go even deeper, the source for the Docker Daemon is in the moby project and the Docker Client is in the Docker CLI project. You can build both projects yourself if you like. The moby project is fairly straightforward, the CLI project is a bit more complex to get building.

Official installation instructions for Docker Engine can be found here.

Docker Engine can also be installed using Chocolatey, using the Docker-Engine chocolatey package (as I learned from Chris Blank during my session @ Directions EMEA, thanks:-))

Docker Engine contains all functionality needed for running BcContainerHelper and the Business Central generic image.

Personally, I am not using the Chocolatey packages. Instead I have created a PowerShell script, which installs or updates Docker Engine on my machine. This script was created based on the information on the Docker Docs page.

Note that this script is NOT supported and I only recommend you to use this script if you understand what it does and can fix issues if any occurs on your machine.

This PowerShell script can be found here.

And, BTW – if something fails and you need to reset your docker installation, you can use this script, which is explained in this blog post from December 2018 – you cannot just remove the c:\programdata\docker folder manually.

Hope this helps

Enjoy

Freddy Kristiansen
Technical Evangelist

18 thoughts on “Docker and Business Central

  1. Pingback: DIRECTIONS EMEA 2021, SOME NEWS FROM MILAN – Roberto Stefanetti Blog – Microsoft MVP and MCT

  2. Dear Freddy Kristiansen, thank you for your blog, it is incredible, thank you also for all the contributions, it is not possible to assess them in their correct measure.

    I think the link to docker-ci-zap has changed. It’s possible?

    David.

    Like

    • I ran the cleanupafter docker earlier today, worked here.
      Note that I did change the scripts 30 minutes ago – as I found that setting the path at the machine level from PowerShell could on some machines trigger Windows Defender to believe that it was a virus.

      Like

  3. Freddy, Question regarding the license terms on W2019. For our our buildserver we use W2019 with containers. Is this also subject to the new license costs?
    Same question for our our daily test machine which are created using get-bcext ARM template, and basically using the same machine type.

    Thx

    Ron

    Like

    • Until September 2022 you are fine.

      I do not know how W2019 with containers have been created from Windows Server team. I assume they use dockerMsftProvider and as such will have to change before September 2022. As I see it, the Windows team has 4 choices:
      1. Remove the W2019 with Containers SKU
      2. Change the W2019 with Containers SKU to only include ContainerD (which is not sufficient for BC – we need the Docker Engine on top)
      3. Change the W2019 with Containers SKU from DockerMsftProvider to use Docker Engine
      4. Change the W2019 with Containers SKU from DockerMsftProvider to use Mirantis Container Runtime (which would be target for a license)

      My bet is on 2
      aka.ms/getbc already installs docker if is isn’t there and I will modify this to use Docker Engine instead of DockerMsftProvider and this will then take care of 1, 2 and 3 above.
      If Windows team does 4 – then just use another image – then the template will add docker engine and you are again good to go.

      Like

      • So for my daily environments no additional costs.
        For my build server I might change to use Docker engine by september 2022.
        For local dev environments I can switch to use Docker engine and your script as well to safe the additional license fees. Right?

        Like

  4. Pingback: Docker and Business Central | Pardaan.com

  5. Hi Freddy, I used your “InstallOrUpdateDockerEngine.ps1” script to install Docker Engine during transitioning two of my build agents (Win 10 & Win 11) from Docker Desktop to Docker Engine. Both have failed to start docker after a reboot. Sound familiar? Event Viewer Application logs reveals our old friend panic.log as the culprit.

    “fatal: open C:\ProgramData\docker\panic.log: Access is denied.”

    And sure enough, that file is read only. Only this time I didn’t panic and just made it read write and Docker Engine started right up. Seems to me that the Docker Engine install (20.10.10) is a bit behind Docker Desktops install as the panic.log issue was resolved a few releases ago in Docker Desktop.

    Did you encounter this issue also when moving to Docker Engine?

    Like

    • Docker Desktop might have fixed this in the docker desktop application. I am fairly certain that docker desktop uses the exact same version of docker engine that is available from the share. I actually don’t think they are allowed to ship anything newer or better as part of Docker Desktop.

      Like

      • Makes sense, though whatever fix they applied mustn’t be in the Docker Engine because the zip file contents contain only the files that go into Program Files\Docker folder. ProgramData\Docker contents must be created by either of the Docker Engine exes at runtime as this folder was removed prior to installing Docker Engine. Thankfully the workaround is pretty simple.

        Like

      • FYI – Docker Engine 20.10.11 released on 17th Nov 2021 includes the fix for panic.log

        Fix panic.log file having read-only attribute set moby/moby#42987.

        Liked by 1 person

  6. Pingback: An update to the ARM templates | Freddys blog

  7. Pingback: An update to the ARM templates - Dynamics 365 Business Central Community

  8. Hi Freddy,

    Please have you faced any difficulties in working with Docker Engine?
    Are you testing on Windows 10/11 and Windows Server as well?
    How to manage Docker Engine?
    How to restart/reset in case of issues?
    How to troubleshoot?
    Are all these processes are the same of using Docker Desktop?
    Please share your experience in a post if possible, it will be really appreciated.

    Thank you

    Like

    • I am running Windows 11 and Windows Server – I see no reason to test anything on Windows 10.
      The script mantioned above will install or update – not sure any other management is needed?
      Restart / reset is the cleanup script mentioned above as well.
      Troubleshooting BC is the same as docker desktop – troubleshooting docker is not – you are required to know your way around.
      Only problem I still have now and then is the panic.log file which becomes read/only and then docker service cannot start (there is an issue on containerhelper on github for this)

      If in doubt – choose Docker Desktop.

      Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s