Windows Server 2019 不支持安装 Docker Desktop。
原因如下:
Docker Desktop 是为 Windows 10 和 Windows 11 专业版/企业版 设计的桌面应用程序,它依赖于一些仅在客户端版本 Windows 中启用的功能(例如 Windows Subsystem for Linux 2、Windows 应用商店支持、用户界面集成等)。
而 Windows Server 2019 属于服务器操作系统,不包含运行 Docker Desktop 所需的某些组件和策略支持,因此官方并不支持在 Windows Server 上安装 Docker Desktop。
替代方案:在 Windows Server 2019 上运行 Docker
虽然不能安装 Docker Desktop,但你仍然可以在 Windows Server 2019 上运行 Docker Engine(基于 Windows 容器)。这是推荐的方式。
✅ 步骤:安装 Docker Engine for Windows Server
-
以管理员身份打开 PowerShell
-
安装容器功能
Install-WindowsFeature -Name Containers -
重启服务器
Restart-Computer -Force -
安装 PowerShell 模块(用于安装 Docker)
Install-Module -Name DockerMsftProvider -Repository PSGallery -Force -
安装 Docker Engine
Install-Package -Name docker -ProviderName DockerMsftProvider -
重启系统
Restart-Computer -Force -
验证安装
docker --version docker run hello-world:nanoserver
⚠️ 注意:你只能运行 Windows 容器(如基于
nanoserver或windowsservercore的镜像),无法在 Windows Server 上运行 Linux 容器,除非你使用 WSL2(但 WSL2 在 Windows Server 上不可用)。
补充说明
| 功能 | 是否支持 |
|---|---|
| Docker Desktop | ❌ 不支持 |
| Docker Engine(Windows 容器) | ✅ 支持 |
| Linux 容器 | ❌ 不支持(无 WSL2) |
| Kubernetes(原生) | ❌ 不支持(Docker Desktop 提供的不适用) |
推荐做法
如果你需要管理容器化应用,建议:
- 使用 Windows Server + Docker Engine 运行 Windows 容器服务。
- 或者迁移到 Windows Server Core + Kubernetes(如 AKS-Engine 或 Rancher) 进行编排。
- 如需 Docker Desktop 的图形界面功能,应使用 Windows 10/11 专业版。
参考链接
- Microsoft 官方文档:Install Docker EE on Windows Server
- Docker 官方文档:Supported platforms
✅ 总结:不能安装 Docker Desktop,但可以安装 Docker Engine 来运行 Windows 容器。
云服务器