Currently, there are 3 options(Volume, Bind Mount, Tmpfs) that exist to manage storage concerns in Docker. The volume is the most compelling and suggested one to use. So when to use volume in Docker?
- if you want to decouple data from the container life cycle
- if you want to manage data/volume with docker native commands (docker volume create/ls/inspect ..)
- if you want to port volume create in Linux to Windows or vice versa
- if you want to use 3rd party shiny storage options like cloud storage or local container storage options
- if you want to share a volume safely across different containers/services