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?

  • Apache not running automatically on docker compose up
  • Docker Container to Container communication with IPv6 only
  • Change chmod of dir from volume
  • Is it wrong to run a single process in docker without providing basic system services?
  • Adding InfluxDB server in Chronograf - getting getsockopt
  • Restcomm RVD is not running from docker container
  • Automatic Docker stop after running in CentOS [closed]
  • docker container hostname sequential number
  • Why does docker prompt “Permission denied” when backing up the data volume?
  • Fail to run docker on kubernetes
  • Sending emails in Symfony via a docker container mail server
  • Can’t push to docker hub (authentication required)
  • 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.

    https://docs.docker.com/userguide/dockervolumes/

    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.