Multiple docker servers using same containers

I have multiple VMs that are all running Docker, and I need them to be all able to start/stop the same container. For example, if I had a text document in one container on one VM, I would need to be able to start and edit that text document on any of the Docker servers (so they are all interconnected). I was thinking I could put the containers on a shared instance, but then I wasn’t sure how to be able to get each Docker server to launch them from there. Any ideas?

  • install mysql in docker and expose mysql service to outside
  • Suppressing interactive output in Gradle exec tasks
  • Use Docker in Linux VMWare VM with Volumes?
  • How can I listen for signals from Docker in .Net Core Executable?
  • How do I stop my docker VM from attaching a debugger to my executable?
  • how to get logs in docker alipne haprox:1.5 logging
  • want to use the same host and port for ssh session
  • Apache container freezes due to locked file on shared volume using Docker for Windows
  • Docker hiding IP of calling container [closed]
  • How is docker able to mount a volume from docker client into a docker container running on docker host?
  • DB, user not created using postgres docker-compose
  • WebSharper site working locally but not in docker
  • One Solution collect form web for “Multiple docker servers using same containers”

    If you are looking to share data between Docker containers I’d start with either a data volume or a data volume container:

    Data volumes

    A data volume is a specially-designated directory within one or more
    containers that bypasses the Union File System to provide several
    useful features for persistent or shared data:

    • Volumes are initialized when a container is created
    • Data volumes can be shared and reused between containers
    • Changes to a data volume are made directly
    • Changes to a data volume will not be included when you update an image
    • Volumes persist until no containers use them

    Creating and mounting a Data Volume Container

    If you have some persistent data that you want to share between
    containers, or want to use from non-persistent containers, it’s best
    to create a named Data Volume Container, and then to mount the data
    from it.

    You specify a data volume with the -v option to the docker run command. You can then use the --volumes-from to mount volumes from a docker volume container to any other containers you want to share the data with. Full details with examples at the above link.

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