微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

为什么Docker需要联合文件系统

Docker做什么与Union File系统(如AUFS)一起创建容器?如果Docker不得不使用常规文件系统而不是联合文件系统会有哪些缺点?

我正在寻找具体的技术细节/内部,而不是一个高水平的答案.

最佳答案
它用于:

>避免每次以新容器运行图像时复制一组完整的文件
>将容器文件系统的更改隔离在其自己的层中,允许从已知内容重新启动相同的容器(因为在删除容器时,更改的层将被关闭)

UnionFS

implements a 07001 for other file systems. It allows files and directories of separate file systems,kNown as branches,to be transparently overlaid,forming a single coherent file system.
Contents of directories which have the same path within the merged branches will be seen together in a single merged directory,within the new,virtual filesystem.

This allows a file system to appear as writable,but without actually allowing writes to change the file system,also kNown as 07002

如果您没有UnionFS,则运行5倍5分钟的200MB映像容器将意味着1GB的磁盘空间.

查看更多在“How does a Docker image work?”.
有关更多技术细节,请参阅:

>“Docker storage drivers
> Anatomy of a Container: Namespaces,cgroups & Some Filesystem MagicJérôme Petazzoni (jpetazzo).

原文地址:https://www.jb51.cc/docker/436283.html

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐