zoukankan      html  css  js  c++  java
  • Docker-v17 的层级(layer)概念

    Docker 的层级(layer)概念
    1.镜像(images)与层级(layers):
    Docker 镜像是由多个文件系统(只读层)叠加而成,每个层仅包含了前一层的差异部分当我们启动一个容器的时候,Docker 会加载镜像层并在其上添加一个可写层。容器上所做的任何更改,譬如新建文件、更改文件、删除文件,都将记录与可写层上。容器层与镜像层的结构如下图所示。
    (A Docker image is built up from a series of layers. Each layer is only a set of differences from the layer before it. The layers are stacked on top of each other. When you create a new container, you add a new writable layer on top of the underlying layers. This layer is often called the “container layer”. All changes made to the running container, such as writing new files, modifying existing files, and deleting files, are written to this thin writable container layer. The diagram below shows a container based on the Ubuntu 15.04 image.)
    2.容器(container)与层级(layers):
    容器与镜像最大的区别就在于可写层上。如果运行中的容器修改了现有的一个已存在的文件,那该文件将会从可写层下的只读层复制到可写层,该文件的只读版本仍然存在,只是已经被可写层中该文件的副本所隐藏。其中,多个容器共享镜像的结构如下所示。
    (The major difference between a container and an image is the top writable layer. All writes to the container that add new or modify existing data are stored in this writable layer. When the container is deleted, the writable layer is also deleted. The underlying image remains unchanged.
    Because each container has its own writable container layer, and all changes are stored in this container layer, multiple containers can share access to the same underlying image and yet have their own data state. The diagram below shows multiple containers sharing the same Ubuntu 15.04 image.)
     
     
    参考资料:
    (1).https://docs.docker.com/
  • 相关阅读:
    [转载]程序员的激情其实是一种痛苦
    利用openSSL 生成RSA公钥和密钥
    表单调试工具推荐
    应该怎么做一个登录功能?
    [转载]常用 SQL Server 规范集锦
    Mock session,cookie,querystring in ASB.NET MVC
    解决VS2013 git客户端遇到的一些问题
    Expression<Func<T>>和Func<T>
    我所理解的领域驱动设计
    月经贴:当落魄的.NET基佬遇上不可一世的JAVA派 developer
  • 原文地址:https://www.cnblogs.com/autopenguin/p/7390239.html
Copyright © 2011-2022 走看看