Hello!
Some arguments of docker service create allow to use template like {{.Node.ID}}. But unfortunately node labels are not supported. What is the right way for a decision of this problem: I need to set the environment variables for every task.
For example:
docker service create --env SOME_ENV="{{.Node.Labels.SOME_NODE_LABEL_VALUE}}"
In this way, I need to configure docker service's task especially for every swarm's node.
Hello! Some arguments of docker service create allow to use template like {{.Node.ID}}. But unfortunately node labels are not supported. What is the right way for a decision of this problem: I need to set the environment variables for every task.
For example:
docker service create --env SOME_ENV="{{.Node.Labels.SOME_NODE_LABEL_VALUE}}"
In this way, I need to configure docker service's task especially for every swarm's node.