docker_practice/image/internal.md

8 lines
630 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

## 鏡像的實現原理
Docker 鏡像是怎麽實現增量的修改和維護的?
每個鏡像都由很多層次構成Docker 使用 [Union FS](http://en.wikipedia.org/wiki/UnionFS) 將這些不同的層結合到一個鏡像中去。
通常 Union FS 有兩個用途, 一方面可以實現不借助 LVM、RAID 將多個 disk 掛到同一個目錄下,另一個更常用的就是將一個唯讀的分支和一個可寫的分支聯合在一起Live CD 正是基於此方法可以允許在鏡像不變的基礎上允許用戶在其上進行一些寫操作。
Docker 在 AUFS 上構建的容器也是利用了類似的原理。