Running Docker Containers on Window Server 2019

Hello, Can anyone guide me as to how I can able to set up and run docker in Windows Server 2019?

Have you tried Microsoft’s documentation?

Windows Server 2019 seems end-of-life (doc), therefore simply don’t.

Too many networks have been hacked, so much data has been encrypted and lost, so many hours spend recovering IT infrastructure - use a maintained OS with security fixes.


Good point. The documentation I linked actually shows Windows Server 2022.

@kastupchapagain Are you trying to run Docker in production, or you have a test server and just want to practice but not able to upgrade to 2022?

On second thought, there is an extended support until 2029, whatever that means

Yeah window server 2019 has extended support until 9 Jan 2029 so we have a 5 years time frame to maintain the docker on it.

I can go for installing docker in window server 2022 that is not a issue but docker need to be install on window server 2019 or window server 2022

Then my first question is still valid about Microsoft’s documentation.

If you have a specific issue someone can try to help you, but we can’t give you a better guide than the official documentation. I also have to correct myself

I stated the above, because I saw 2022 mentioned in the content, but at the top of that page there is this note as well:

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows 10 and 11

Do you have any gidence for this issue which I faced while installing docker in window server 2022

PS C:\Users\Administrator> Install-Module -Name DockerMsftProvider -Repository PSGallery -Force                                                                                                                                                 NuGet provider is required to continue                                                                                  PowerShellGet requires NuGet provider version '' or newer to interact with NuGet-based repositories. The NuGet  provider must be available in 'C:\Program Files\PackageManagement\ProviderAssemblies' or                               'C:\Users\Administrator\AppData\Local\PackageManagement\ProviderAssemblies'. You can also install the NuGet provider by
 running 'Install-PackageProvider -Name NuGet -MinimumVersion -Force'. Do you want PowerShellGet to install
and import the NuGet provider now?
[Y] Yes  [N] No  [S] Suspend  [?] Help (default is "Y"): Y
PS C:\Users\Administrator> Install-Package -Name docker -ProviderName DockerMsftProvider
WARNING: Cannot find path
'C:\Users\ADMINI~1\AppData\Local\Temp\2\DockerMsftProvider\DockerDefault_DockerSearchIndex.json' because it does not
WARNING: The remote server returned an error: (400) Bad Request.
Install-Package : No match was found for the specified search criteria and package name 'docker'. Try
Get-PackageSource to see all available registered package sources.
At line:1 char:1
+ Install-Package -Name docker -ProviderName DockerMsftProvider
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Microsoft.Power....InstallPackage:InstallPackage) [Install-Package], Ex
    + FullyQualifiedErrorId : NoMatchFoundForCriteria,Microsoft.PowerShell.PackageManagement.Cmdlets.InstallPackage

That’s not how the documentation I linked recomends installing Docker CE. Please, follow the instructions in the documentation. Or if I’m wrong and you followed it, please share a direct link or a URL and the title of the section.

1 Like

use a maintained OS with security fixes.

Please note that Windows Server 2019 will get security updates until 2029.
Just coming here to clarify: Mainstream support means we’re actively working on features for this OS. Or if a new feature is introduced in a more recent OS and this OS is under the Mainstream support, Microsoft will (when possible) backport the feature. When the OS enters Extended support, it means no new features. The OS will get security updates, though.

1 Like

The type of support provided in the Extended Support phase is consistent across all products. Critical security updates are made available for products until the published Extended Support end date. This allows businesses to ensure that they are up to date in protection against security attacks.

So only “critical” security issues are fixed. MS decides what is critical. No regular bug fixes.

And as an end-of-life product, there is no guarantee that 3rd party software updates (like Docker) will be running on the old OS.

I don’t know about the decision regarding critical issues, but I guess security issues would be critical. Since Microsoft’s documentation states Docker would work on it, I doubt they would drop support of an otherwise still supported OS. Can you confirm it @vrapolinario ?

Of course, 3rd party tools can indeed drop support any time, but since the same installation guide applies for Windows server 2022 as well and @kastupchapagain had no problem with installing Docker on the WS 2022, it doesn’t seem to be an issue. People who can’t upgrade to newer server version can at least use the old one and take the responsibility regarding 3rd party tools.

Can you confirm it @vrapolinario ?

Yes. In the Docker docs, it is stated that as long as Microsoft supports the OS, Docker will support Docker Desktop on it. Please note that in any case, Docker Desktop is not supported on Server - neither 2019 or 2022. On Server, you run Docker CE/Moby or containerd. I recently suggested an update to the Docker docs to make that clear: Install Docker Desktop on Windows | Docker Docs

Docker only supports Docker Desktop on Windows for those versions of Windows that are still within Microsoft’s servicing timeline. Docker Desktop is not supported on server versions of Windows, such as Windows Server 2019 or Windows Server 2022. For more information on how to run containers on Windows Server, see Microsoft’s official documentation.

So, from a Docker Desktop standpoint this point is moot. You can run containers on Windows Server with - as mentioned - Docker CE/Moby or containerd. If you can upgrade to 2022, great. If you can’t, you can still run containers on Windows Server 2019 in a secure way, but you won’t benefit from new features.

Thanks @rimelek for sharing the documentation for the setup of docker CE in Window Server 2022 Prepare Windows operating system containers | Microsoft Learn

I am further working on creating a container image with IIS, PHP, DRUPAL CODE running on it

1 Like