Swarm Manager copying files to nodes

Hey!

I’ve tried to search for a reasonable solution without using any third part stuff to copy files from swarm manager to workers. I’m not sure it’s possible but since I can run services etc… I know atleast some form of communication is available.

docker@manager:~$ docker node ls
ID                           HOSTNAME  STATUS  AVAILABILITY  MANAGER STATUS
9ulexgugagruwl0oiunekjfc6    worker2   Down    Active
a1dvd1lvwc3xu8f0fmc16bhnp    worker1   Down    Active
piov0g5o5y994dychzt789263    worker3   Down    Active
yog76jp89ebbpk5nuodduwzc4    worker4   Down    Active
ypb7xcijzalpi1v6wecrx0v9c *  manager   Ready   Active        Leader

Does anybody have a nice solution for me to basically execute something similar:

docker@manager:~$ scp file.file worker1:~/file.file

Any recommendations are greatly appreciated. I’m trying to implement something similar: I have a swarm cluster set up, I now will for example copy 10 files to the manager and run a script on the manager. The idea is for the manager to evenly distribute the files between the nodes and run a same service on all the nodes (replica number=number of nodes). Each service can now see these files that were copied to the node (mount to image) and modify them and then shut itself down.

Thanks,

Please, check it: How to share data between container (same service)