What Is The Difference Between Binding Mounts And Volumes While Handling Persistent Data In Docker Containers?

后端 未结 4 579
刺人心
刺人心 2021-02-01 02:20

I want to know why we have two different options to do the same thing, What are the differences between the two.

4条回答
  •  粉色の甜心
    2021-02-01 03:03

    As a developer, we always need to do comparison among the options provided by tools or technology... For Volume & Bind mount, I would suggest to list down what kind of application are you trying to containerized... Following are the parameters that I would consider before choosing Volume over Bind Mount - 1. Docker provide various CLI commands to Volumes easily outside containers, 2. Backup, Restore Volume is far easy than Bind as it depends upon underlying host OS 3. Volumes are platform agnostic so it can work on Linux as well as on window containers 4. With Bind, you have 2 technology to take care your host machine directory structure as well as docker, 5. Migration of Volumes are easier not only on local machines but on cloud machines as well 6. Volumes can be easily shared among multiple containers

提交回复
热议问题