Docker Volume before going into docker volume lets clear docker file system first. The Docker File System A Docker image is a collection of read-only layers. When we launch a container from an image, Docker adds a read-write layer to the top of that stack of read-only layers. Docker calls this the "Union File System" . Any time a file is changed, Docker makes a copy of the file from the read-only layers up into the top read-write layer. This leaves the original (read-only) file unchanged. When a container is deleted, that top read-write layer is lost. This means that any changes made after the container was launched are now gone. ====================================== What is docker volume A Docker volume keep outside the container, on the host machine. From the container, the volume use like a folder which we can use to store and retrieve data. It is simply a mount point to a directory on the host. ====================================== Create docker volume Do...
Comments
Post a Comment