docker study notes of the three data volume

Data volume: quit after docker instance data is lost, the data is to be saved. 

What 
's take a look at Docker's philosophy: 
'the use and operation of environmental packaging container forming operation can be run along with the container, but we hope the data requirements are persistent * hope it is possible to share data between container 

Docker container data generated, if the I does not generate a new image by the docker commit, so that the data saved as part of the image, then when the container removed, naturally no data. 
In order to save the data in the docker, we use the volume. Can you do? 
   Volume is the directory or file exists in one or more containers, to mount a docker container, but does not belong to the union file system, it is possible to bypass Union File System for continuous mention some features to store or share data : 
   designed to volume persistent data is completely independent of the lifecycle of the container, so that the data volume Docker not deleted when the container is mounted to delete 
features:






   1 : volumes of data can be shared between the containers or reusable data

   2 : volume changes take effect directly

   3 : data on the volume changes are not included in the update image in

   4: data volume of the life cycle continues until no container to use it so far

 

Guess you like

Origin www.cnblogs.com/wanghuaqiang/p/11521447.html