From 88154eacbeaa5b0272f52ee6127ff84e004ee3a5 Mon Sep 17 00:00:00 2001 From: Aurelien HAVET Date: Wed, 30 Nov 2016 20:40:05 +0100 Subject: [PATCH] fix error on swarm constraint exemple (#749) Constraints for Swarm scheduling are defined as an **environment** option, according to the example in the section *Manual scheduling*, and not as a **label** option --- compose/swarm.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/compose/swarm.md b/compose/swarm.md index e377c63f7c..cae88e2dbd 100644 --- a/compose/swarm.md +++ b/compose/swarm.md @@ -82,15 +82,15 @@ all three services end up on the same node: image: foo volumes_from: ["bar"] network_mode: "service:baz" - labels: + environment: - "constraint:node==node-1" bar: image: bar - labels: + environment: - "constraint:node==node-1" baz: image: baz - labels: + environment: - "constraint:node==node-1" ### Host ports and recreating containers @@ -169,4 +169,4 @@ them. - "affinity:image==redis" For the full set of available filters and expressions, see the [Swarm -documentation](/swarm/scheduler/filter.md). \ No newline at end of file +documentation](/swarm/scheduler/filter.md).