mirror of https://github.com/docker/docs.git
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
This commit is contained in:
parent
94ac86261e
commit
88154eacbe
|
|
@ -82,15 +82,15 @@ all three services end up on the same node:
|
||||||
image: foo
|
image: foo
|
||||||
volumes_from: ["bar"]
|
volumes_from: ["bar"]
|
||||||
network_mode: "service:baz"
|
network_mode: "service:baz"
|
||||||
labels:
|
environment:
|
||||||
- "constraint:node==node-1"
|
- "constraint:node==node-1"
|
||||||
bar:
|
bar:
|
||||||
image: bar
|
image: bar
|
||||||
labels:
|
environment:
|
||||||
- "constraint:node==node-1"
|
- "constraint:node==node-1"
|
||||||
baz:
|
baz:
|
||||||
image: baz
|
image: baz
|
||||||
labels:
|
environment:
|
||||||
- "constraint:node==node-1"
|
- "constraint:node==node-1"
|
||||||
|
|
||||||
### Host ports and recreating containers
|
### Host ports and recreating containers
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue