In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Where is the docker container volume usually placed? The data volume is presented to the docker container in the form of a directory that supports sharing among multiple containers, and modifications do not affect the image. Data volumes that use Docker are similar to mounting a file system in a system using mount.
A data volume is a specially designated directory that leverages the container's UFS file system to provide some stable features or data sharing for the container.
To create a data volume, you can create one data volume as long as the-v parameter is followed by the docker run command, or you can create multiple data volumes with multiple-v parameters. Once you have created a container with a data volume, you can mount the data volume in other containers with the-volumes-froms parameter.
Add new data volume
Docker run-d-v / tmpd/busyboxtest-- name busyboxtest busybox
The-v parameter creates a new container volume under / tmp/busybox of the container
View the location of the data volume through the docker inspect command
Docker inspect busyboxtest | grep volumes "/ tmp/busyboxtest": "/ var/lib/docker/volumes/577784c9e8aa3fba15ebf56ee680b6fea50aafe60bd753b64c3699e461fa3e39/_data"
Mount the host directory as a data volume
Docker run-tid-v / tmp/volumetest:/data:ro-- name busyboxtest2 busybox
Mount the / tmp/volumetest of the host under / data in the way of ro
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.