In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-26 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly explains "what is the meaning of docker storage volume". Interested friends may wish to take a look at it. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn "what does docker storage volume mean?"
There are two types of storage volumes: the main difference between binding and mounting storage volumes and managing storage volumes is that they are mounted on the host location. The location of management storage volumes is controlled by the docker daemon, which is called docker space
Bind mount storage volum
Use:-v or-- volume format:-v:
1. It replaces the content provided by the mirror at that location, that is, the contents of the host will overwrite the contents of the container.
two。 If you specify a host directory that does not exist, docker will create the corresponding directory for you
3. If you want to bind a single file, the file must exist on the host before the container is created, otherwise docker will create a directory
4. The host file directory allows you to bind to multiple containers. May cause competition for resources and lead to problems.
Read-only volume: you can prevent any process in the container from modifying the contents of the volume. For example:-v / data/my.conf:/data/my.conf:ro
Manage storage volum
The docker daemon is created in the host file system and managed by docker, which is a way to decouple volumes at specific locations on the file system.
Use:-v or-- volume format:-v
1. When the container is created, the docker daemon creates a directory in the host file system, and you can view the volumes using docker inspect
two。
Inherit the definition of a storage volume
Docker rund-d\
-- volumes-from zookeeper1\
-- volumes-from zookeeper2\
-- name zookeeper3\
Zookeeper:1.2.3
Volumes can be copied from one or more containers to a new container so that the replicated volumes always have the same mount point.
1. If the management volumes created by one or more sources have the same mount point, only one of them can be received.
two。 Cannot change the write permission of a volume
3. If you build a container that needs to share volumes to a different location, you cannot use-- volumes-from
Manage the lifecycle of storage volumes
1. The docker daemon cannot delete the bound mount volume
two。 Add-v to delete the container to delete the management storage volume such as docker rm-v zookeeper
3. If you delete the container without using-v, the orphaned volume will be generated, and the orphaned volume can only be emptied manually.
At this point, I believe you have a deeper understanding of what "docker storage volume means". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
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.