0 0 Share PDF

'--mode global' can cause platform mismatch for replica

Article ID: KB000154


Docker EE 17.06 supports mixed platform worker nodes (for example, Linux and Windows Server worker nodes in the same cluster).

Starting in Docker 17.06 EE, the Swarm manager automatically schedules containers to worker nodes with the corresponding platform. For example, a service that runs Windows containers will schedule replicas only to Windows worker nodes. However, when --mode global is used, task will be assigned to all nodes regardless of the platform type. This might be the desired behavior for all containers.


Task can be assigned a specific platform by adding a constraint like this:

docker service create --name windowsonly `
--mode global 
--constraint 'node.platform.os == windows' `