Docker: mounting volumes from other docker service (not container)
I have two hosts that run docker service on each host.
Container from host A wanted to uses volume that created from host B.
Is this possible?
One Solution collect form web for “Docker: mounting volumes from other docker service (not container)”
noops, both services should be on the same host but there is one thing you can do.
All reused data volumes are mounted on the same paths as in the source
service. Containers must be on the same host in order to share
volumes, so the containers of the new service will deploy to the same
nodes where the source service containers are deployed.
- mount volume to a host directory
- sync that directory between your nodes
You can use NFS to sync directories on all nodes, i have used it myself works fine