Answer the question
In order to leave comments, you need to log in
How to set a specific environment variable for each node in docker swarm?
For the docker service create command , you can use templates for the --env field, but the Labels variable for Node is not available there, for example:
docker service create --env SOME_ENV="{{.Node.Labels.SOME_NODE_LABEL_VALUE}}"
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question