User documentation for Service Constraints and Endpoints

I’m trying to understand the “docker service create” constraints and endpoints options, but the user documentation appears very limited on these options.

$ docker service create --help

Usage:	docker service create [OPTIONS] IMAGE [COMMAND] [ARG...]

Create a new service

      --constraint value             Placement constraints (default [])
      --endpoint-mode string         Endpoint mode(Valid values: VIP, DNSRR)

Where are these options documented?

1 Like

They probably haven’t got to it yet :wink:

I’ve been poking around, trying to figure out the same thing. I found some information at the bottom of, and have so far successfully bound a service to a node by ID and role.

docker service create --constraint " == 3h6tis7hkea9ysopfc40wndyy" redis

docker service create --constraint "node.role == worker" redis

docker service create --constraint "node.role == manager" redis

I did have to upgrade to 1.12-rc4 in order to get the node.role constraint to work

1 Like

Is there documentation on --endpoint-mode yet?