I have been aware of Docker for some time but never really “understood” how it works until recently. I am reading a book and based on it have created a few container running a few applications.
I understand that Docker recommend to use one container per application and this is what I have done. Also for persistent data I was using a local directory until I discovered Data Volumes. Since it seems to be the preferred way, I have a question.
Like for applications are you supposed to create a data volume per application or could you reuse one for all of them?
I have 3 containers that run 3 applications. I also have 2 containers that run Mariadb and are connected to 2 of the applications. The persistent data for the moment for the database are in 2 local directory.
Do I need to create 2 data volumes container to replace each local directory or can I create 2 mountpoint in one volume and then link it to each database?
I hope I am making sense. As I said I am new to Docker and I am not always sure of which terms to use for certain concept.