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.

  • Kubernetes - Routable IP to individual Pods
  • dockerfile: how use CMD or ENTRYPOINT from base image
  • Can I run docker containers linked with different OS
  • How to link jenkins pipeline job to label on docker slaves containers
  • Docker Swarm Service Can Not Be Reached on Different Node After Period
  • ERROR: for app no such device
  • Is this possible?

  • Need to take image of docker image or container from application installed machine in AWS
  • Docker Container npm global affect host or only container?
  • Docker ContainerID Unavailable
  • Have to docker-machine ssh default to pull images
  • Subscribing to Docker Events
  • Docker container with Neo4j 2.3 enterprise edition exits without error message when mounting graph.db volume
  • 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.

    https://docs.docker.com/docker-cloud/apps/volumes/

    Possible solution:

    1. mount volume to a host directory
    2. sync that directory between your nodes

    You can use NFS to sync directories on all nodes, i have used it myself works fine

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.