Docker stopped working on Windows VMs - summary of tests and alternative

Docker stopped working on Windows VMs - summary of tests and alternative

First version: 2023-10-30
Last version: -
Last change: -

Idea
This is a community effort. The article was created by the anDREa Support Team in their spare time. If you have found a more efficient way to approach this, please contact us and we will update the article.

Introduction

We have received some tickets about Docker not working anymore on Windows VMs. As a sideproject, at anDREa we tried to conduct some tests and we describe them below. 

First test - Docker Desktop

According to https://docs.docker.com/desktop/vm-vdi/ it is possible to run Docker Desktop on a Windows VM. However, what it does not describe is that it won’t work anymore on Windows Server 2019 (the OS running on a Windows VM). 

What we tried:
  1. Created a Windows VM suitable for nested virtualization and with Hyper-V enabled (Standard_D4s_v5).
  2. Install Docker Desktop. This fails because it detects that the OS is not suitable. It requires Windows 10 or higher.


Second test - DockerMsftProvider

As always, a good start for workarounds is Googling and we found another possible option to install Docker on Windows Server 2019: https://computingforgeeks.com/how-to-run-docker-containers-on-windows-server-2019/ 

We thought this would work as the article is from August 2023, however we got hit by multiple errors messages. We allowlisted microsoft.com and powershellgallery.com for this attempt. 



As can be seen in the error above, it seems like the package does not exist anymore, so further investigation yielded that DockerMsftProvider is (as of May 2023) deprecated and no longer in service: https://github.com/OneGet/MicrosoftDockerProvider. The reason is that Docker sold the Docker Enterprise Edition (EE) part to Mirantis Inc. This is now paid.

Third test - Alternatives


Docker Community Edition (CE) is now The Moby Project. We allowlisted docker.com in the Workspace and used this script to install Moby: https://raw.githubusercontent.com/microsoft/Windows-Containers/Main/helpful_tools/Install-DockerCE/install-docker-ce.ps1 



Seems like that installed properly and could be an alternative to use Docker on a Windows VM.