How to share volumes across multiple hosts in docker engine swarm mode?

前端 未结 3 1359
既然无缘
既然无缘 2021-02-07 04:10

Can we share a common/single named volume across multiple hosts in docker engine swarm mode, what\'s the easiest way to do it ?

3条回答
  •  轮回少年
    2021-02-07 04:42

    If you have an NFS server setup you can use use some nfs folder as a volume from docker compose like this:

    volumes:
        grafana:
          driver: local
          driver_opts:
            type: nfs
            o: addr=192.168.xxx.xx,rw
            device: ":/PathOnServer"
    

提交回复
热议问题