You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Schedule containers on a specific nodelabels:
- "constraint:node==node-1"# Schedule containers on a node that has the 'storage' label set to 'ssd'labels:
- "constraint:storage==ssd"# Schedule containers where the 'redis' image is already pulledlabels:
- "affinity:image==redis"
londoncalling
changed the title
compose/swarm.md constraints should under environment, rather than labels
Constraints in Compose file should under "environment" not "labels"
Apr 5, 2017
Uh oh!
There was an error while loading. Please reload this page.
URL: https://docs.docker.com/compose/swarm.md
There are 2 examples
and
I think both of them are wrong, the
constraint
should underenvironment
. See the following example from https://docs.docker.com/swarm/scheduler/filter/#/example-node-constraints:The text was updated successfully, but these errors were encountered: