Persisting Data In Docker: Volumes & Bind Mount

<p>Containers have changed how developers work, making developing and deploying code easier. In today&#39;s dynamic world of software development, it&rsquo;s important to understand how to work with Docker. So I always tried covering one topic in the blog to help you understand Docker easily. In this article, we&rsquo;ll explain the basics of Docker volumes in a straightforward way.</p> <h1>Docker Volume</h1> <p>Docker Volume is a mechanism that helps us to store data outside the container. They prevent data loss when your container stops. You can easily connect the volume to a new container, and your data from the previous one will carry over to the new container.</p> <p>When a container usually writes something it writes in its writable layer and on stopping that container all data is deleted from the container. So in order to solve this issue what we do is we mount a special folder in the container file system. So if the container wants to add something on that particular file system point where volume is mounted in that case data is not written on the writable layer instead it is written in volume.</p> <p><a href="https://medium.com/@younusraza909/persisting-data-in-docker-volumes-bind-mount-5c0402b0f731"><strong>Click Here</strong></a></p>
Tags: Bind Mount