Closed man4j closed 5 years ago
Good question!
Then you have to strictly run this on the Swarm manager node, because the manager node's Docker socket is the only place where you get info for the whole cluster's tasks. And if the manager node changes, this container also has to relocate to the new node. This can be accomplished with a placement constraint of node.role == manager
(see example in dockersockproxy).
Initially I thought that it's better for promswarmconnect to not have this constraint, and have dockersockproxy handle this awkwardness, since I have to have the dockersockproxy anyway because I'm using Portainer at my home which also needs remote and secure access to the Docker socket.
But you're totally right, this TLS + client cert authentication makes this more complicated for all other people than myself, so that'd be selfish for me not to include the simpler option. I'll make this change immediately!
Docker socket option is now implemented, and the README now contains much better usage documentation.
Thanks for pushing me to do better!
If map docker.sock inside container and use Docker client for GO you can simplify deployment of this solution. What are the disadvantages of the proposed option? Thanks.