Should I Switch from Bind Mounts to Docker Volumes for My Containers?

0
10
Asked By CuriousCoder92 On

I manage around 50 containers and currently use bind mounts for all my data files. I'm wondering if there's any advantage to switching to Docker volumes on the same disk. What do you think?

4 Answers

Answered By DataNinja55 On

Honestly, it depends on your use case. Both bind mounts and Docker volumes have their place. If your current setup is working fine for you, there might not be any need to switch.

Answered By DevGuru4 On

Check out this video for a deeper understanding: https://youtu.be/keINzeYs_lc. It explains how both options differ and when you might want to use one over the other.

Answered By TechSavvy77 On

Bind mounts give you a lot of control since you decide where they live and how they function. You can see the files directly without needing to exec into your containers for changes. However, managing permissions and other aspects falls on you. Also, if you ever want to connect to different types of storage solutions like S3 or NFS, Docker volumes would be better since they have various plugins for that.

Answered By DocuMatic On

For more detailed info, you can refer to Docker's documentation on storage here: https://docs.docker.com/engine/storage/volumes/. But just a heads up, it doesn’t give a thorough comparison of their pros and cons.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.