"Vmcloud Cloud Platform" embracing Docker (Fri) Volume (1)

Source: Internet
Author: User

In the previous article, we talked about how to configure multiple containers and customize their own mirrors, but how does the data performance and durability of the container guarantee? This article explains the problem by introducing Docker volume, which involves the following architecture:

650) this.width=650; "title=" image "border=" 0 "alt=" image "src=" http://vmcloud.info/wp-content/uploads/2016/05/ Image_thumb.png "width=" 549 "height=" 407 "style=" border:0px;height:auto;float:none;padding-top:0px;padding-left:0 Px;margin-left:auto;padding-right:0px;margin-right:auto;background-image:none; "/>

1, speaking of volume actually have a variety of ways can be achieved, the first way for the use of dockerfile, but this way to find the corresponding volume stored in the host where more trouble. First we find out which images we exist:

650) this.width=650; "title=" image "border=" 0 "alt=" image "src=" http://vmcloud.info/wp-content/uploads/2016/05/ Image_thumb-1.png "width=" 644 "height=" "style=" Border:0px;height:auto;padding-top:0px;padding-left:0px;margin : 0px;padding-right:0px;background-image:none; "/>

2. Then we write a dockerfile, and in which we specify volume:

650) this.width=650; "title=" image "border=" 0 "alt=" image "src=" http://vmcloud.info/wp-content/uploads/2016/05/ Image_thumb-2.png "Width=" 309 "height=" 267 "style=" Border:0px;height:auto;padding-top:0px;padding-left:0px;margin : 0px;padding-right:0px;background-image:none; "/>

3. We then use the Docker file to build the image (about Dockerfile later):

650) this.width=650; "title=" image "border=" 0 "alt=" image "src=" http://vmcloud.info/wp-content/uploads/2016/05/ Image_thumb-3.png "width=" 407 "height=" 181 "style=" Border:0px;height:auto;padding-top:0px;padding-left:0px;margin : 0px;padding-right:0px;background-image:none; "/>

4, we create a base image with volume, and the container created based on this base image has a/vmctest mount point, and we can test the creation of a container:

650) this.width=650; "title=" image "border=" 0 "alt=" image "src=" http://vmcloud.info/wp-content/uploads/2016/05/ Image_thumb-4.png "width=" 614 "height=" "style=" Border:0px;height:auto;padding-top:0px;padding-left:0px;margin : 0px;padding-right:0px;background-image:none; "/>

5. Let's see if there is a/vmctest mount point, we create a file for testing:

650) this.width=650; "title=" image "border=" 0 "alt=" image "src=" http://vmcloud.info/wp-content/uploads/2016/05/ Image_thumb-5.png "width=" 494 "height=" 113 "style=" Border:0px;height:auto;padding-top:0px;padding-left:0px;margin : 0px;padding-right:0px;background-image:none; "/>

650) this.width=650; "title=" image "border=" 0 "alt=" image "src=" http://vmcloud.info/wp-content/uploads/2016/05/ Image_thumb-6.png "width=" 313 "height=" 109 "style=" Border:0px;height:auto;padding-top:0px;padding-left:0px;margin : 0px;padding-right:0px;background-image:none; "/>

6. So where does this vmctest exist? We can see the actual location with the following command:

650) this.width=650; "title=" image "border=" 0 "alt=" image "src=" http://vmcloud.info/wp-content/uploads/2016/05/ Image_thumb-7.png "width=" 644 "height=" "style=" Border:0px;height:auto;padding-top:0px;padding-left:0px;margin : 0px;padding-right:0px;background-image:none; "/>

7, you can see the actual mapping location, we can go to the path to see, just created the test file is not in:

650) this.width=650; "title=" image "border=" 0 "alt=" image "src=" http://vmcloud.info/wp-content/uploads/2016/05/ Image_thumb-8.png "width=" 644 "height=" 106 "style=" Border:0px;height:auto;padding-top:0px;padding-left:0px;margin : 0px;padding-right:0px;background-image:none; "/>

8, OK, about the first usage of the data volume, we introduce here, the next we will introduce another more violent mounting mode.

650) this.width=650; "title=" image "border=" 0 "alt=" image "src=" http://vmcloud.info/wp-content/uploads/2016/05/ Image_thumb-9.png "width=" 537 "height=" 351 "style=" Border:0px;height:auto;float:none;padding-top:0px;padding-left : 0px;margin-left:auto;padding-right:0px;margin-right:auto;background-image:none; "/>


This article from "Vmcloud" blog, declined reprint!

"Vmcloud Cloud Platform" embracing Docker (Fri) Volume (1)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.