When nodes add themselves to a swarm, it is a nice opportunity to set some labels using information available locally. Currently this requires using docker node update
instead which won’t work on worker nodes, which makes it harder to get the information available locally added as node labels.
So, something like this would be nice:
docker swarm join \
--token SWMTKN-1-5u73v65jpqeq1x1noh4ech6d5q83bumjd0kma7l1aft93rspnz-d8rx56ksb14bwkube2r8r7d86 \
--label-add foo=bar
192.168.77.21:2377
This would add the node and set the node labels at the same time so there is no need for a separate docker node update --label-add foo=bar
from a different machine.