Windows Server上Service Fabric集群部署Docker容器的技术咨询
1. Do I need to install Docker on each node, and should I choose CE or EE?
Absolutely, you must install Docker on every node in your Service Fabric (SF) cluster if you want to run Windows containers. The error you're encountering:
Error event: SourceId='System.Hosting', Property='Download:1.0:1.0:45cc185a-abde-47f4-9a1f-943ad6e29d23'. There was an error during download.Container deployment is not supported on the node.
This is directly caused by the missing Docker runtime on your target nodes. Service Fabric relies on the local Docker engine to pull container images, manage container lifecycles, and orchestrate deployments—without it, SF has no way to handle container workloads.
For version selection:
- Docker EE (Enterprise Edition) is the recommended pick for production environments. It’s officially supported by both Microsoft and Docker, integrates seamlessly with Windows Server 2016, and includes stability patches, enterprise-grade support, and compliance tools tailored for business use cases.
- Docker CE (Community Edition) works for testing or non-production scenarios, but you need to select a version compatible with Windows Server 2016. Newer CE versions may drop support for 2016, so aim for releases like Docker CE 20.10.x (double-check Docker’s release notes for exact compatibility).
Before installing Docker, enable the Windows Containers feature on each node via PowerShell first:
Install-WindowsFeature Containers
Restart the node afterward, then proceed with Docker installation.
2. Can I run Linux containers on a Windows Server-based Service Fabric cluster?
You can’t run Linux containers directly on Windows Server nodes—Linux containers require a Linux kernel, which Windows Server doesn’t natively provide. However, you have two viable options depending on your use case:
- Test/Development Scenario: Enable WSL2 (Windows Subsystem for Linux 2) on your Windows Server 2016 nodes, install Docker inside the WSL2 distro, and configure Service Fabric to target the WSL2 Docker runtime. Note that this setup isn’t officially supported for production and may have stability or performance limitations.
- Production Scenario: Expand your SF cluster to include Linux nodes (e.g., Ubuntu Server VMs). Service Fabric supports mixed-OS clusters, so you can deploy Windows containers to your existing Windows nodes and Linux containers to the new Linux nodes. This is the fully supported, production-grade approach.
内容的提问来源于stack exchange,提问作者SteppingRazor

