Docker Volumes - Deep Dive with Use Cases
Understanding Docker Volumes in-depth with real-time scenarios. Where the MongoDB is the backend tier Database and frontend web application using - Mongo-Express container. Use Case 1: MongoDB container without volume observe what happens to the data. Use Case 2: After attaching volume = persistence - confirm re-create containers data persist Use Case 3: Database containerversion changes does not impacts the Data persisted Let's start the experiment on data persistance. Docker Volume deep dive - MongoDB persistant To share the sensitive data we use network isolation, which is already discussed in Docker Networks post. # Create Network docker network create mynet Now let's use this mynet throughout all our use-case examples. MongoDB Connect to Mongo-express which is a member in the same network so that it can access the database Use Case 1: MongoDB Without any volume - Non Persistence MongoDB Container without any persistance storage : docker run -d --...