Docker-compose - volumes driver local meaning

后端 未结 1 2013
醉梦人生
醉梦人生 2020-12-14 06:27

I\'m making some docker-compose yml file with this link. In this config, What does meaning of driver: local in top-level volumes?

volumes:
  esdata1:
    dri         


        
相关标签:
1条回答
  • 2020-12-14 06:54

    It's volume driver, equivalent to

    docker volume create --driver local --name esdata1
    docker volume create --driver local --name esdata2
    

    local means the volumes esdata1 and esdata2 are created on the same Docker host where you run your container. By using other Volume plugins, e.g.,

    --driver=flocker
    

    you are able to create a volume on a external host and mount it to the local host, say, /data-path. So, when your container writes to /data-path, it actually writes to a external disk via network.

    Refer here for some sort of Volume plugins available

    0 讨论(0)
提交回复
热议问题