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.

  • Maven WAR Build for Tomcat: “Could not open ServletContext resource [/WEB-INF/applicationContext.xml]”
  • Solr running inside docker container is not connecting to PostgreSQL database
  • Docker containers with one public IP
  • Unable to autolaunch a dbus-daemon without a $DISPLAY for X11 in Docker container
  • Monitoring a log file for systemd service startup
  • How can I debug a docker push on Mac using docker-machine?
  • Is this possible?

  • Docker “Can't connect to local MySQL server through socket”
  • docker- compose error: service 'build' must be a mapper not a string error
  • Installation latest kubernetes version (1.1.1) on Mesos 0.25
  • How to convert a systemctl command to supervisord command
  • Micro-components architecture with python / Django / Drf
  • CoreOS Single Container High Memory Usage
  • 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.