InterviewSolution
| 1. |
What is Docker volume mounting? |
|
Answer» Data is not persistent inside a container. One of the most used methods is Volume mounting. Another method for persisting data is to include data in the writable layer but that layer is tightly coupled with the host machine where the container is RUNNING, thus the data couldn’t be managed easily. Also writing into the writable layer is complex and needs to use a driver. To retain data, the best-preferred way is to use a Docker volume mount where it mounts another directory into your container. This directory is on the host which could be SEEN within the container. The main advantage of volume mounting is
Following commands could be used to manage volumes:
|
|