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
|
||||
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).
|
||||
documentation](/swarm/scheduler/filter.md).
|
||||
|
|
Loading…
Reference in New Issue