1/6/2024 0 Comments Convoy plugin odkcer![]() When the client and Daemon Interaction, When creating a data volume using a plug-in ,Daemon The corresponding.In the default path Unix Socket file, Automatically discover available plug-ins. Plugin Start and stop of, Not return Docker management ,Docker Daemon Rely on finding.Docker Plugin In order to Web Service Our services run on every machine Docker Host Upper, adopt HTTP Protocol transfer RPC Style JSON Data communication complete.ĭocker The official only provides the volume plug-in api, Developers can customize the volume plug-in driver according to the actual needs. ĭocker By default, the volume uses local Type driven, Only host computers can exist, Cross host volume You need to use a third-party driver. The same thing : Both are host A path in the file system. website]# curl 172.17.0.2īind mount And docker managed volume contrast website]# docker run -d -name demo -v vol1:/usr/share/nginx/html:ro nginx website]# cp index.html /var/lib/docker/volumes/vol1/_dataĬp: overwrite ‘/var/lib/docker/volumes/vol1/_data/index.html’? y "Mountpoint": "/var/lib/docker/volumes/vol1/_data", Take website Copy content from to vol1 volume, establish nginx Warehouse, Access port, The content is index.html ~]# ls -> website WARNING! This will remove all local volumes not used by at least one container.Īre you sure you want to continue? yĬreate a volume ~]# docker volume create vol1 ~]# docker volume prune # Clear unused volumes var/lib/docker/volumes/9a393403b78c139a5a283150dcf2828eb7e6fbfc2c9f55c9faec483abfdb81df/_dataĬONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES If you point to the existing directory in the container when mounting, The original data will be copied to volume in.The data volume directories created by default are in /var/lib/docker/volumes in.docker managed volume You don't have to specify mount Source ,docker Automatically create data volume directories for containers.bind mount Must specify host File system path, Limited portability.Rm: can't remove 'dvd.repo': Device or resource busy ~]# docker run -rm -it -v /data1:/data1 -v /data2:/data2:ro -v /etc//dvd.repo:/dvd.repo:ro busybox ~]# docker inspect demo # see ipīind mount The default permission is read and write rw, You can specify read-only when mounting ro, - v Option, If it doesn't exist, When mounted, it will automatically create. ![]() ~]# docker run -d -name demo -v /root/website:/usr/share/nginx/html nginx # Hang on to nginx The default publishing directory for Use -v Option specifies the path, Format :.Use intuitive and efficient, Easy to understand.Is to transfer the directory or file on the host mount Into the container.Local disks only, Cannot migrate with container Same performance as host disk, The container remains after deletion Mount To the host, Bypass file hierarchy
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |