> For the complete documentation index, see [llms.txt](https://philipzheng.gitbook.io/docker_practice/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://philipzheng.gitbook.io/docker_practice/image/internal.md).

# 實作原理

Docker 映像檔是怎麽實作增量的修改和維護的？ 每個映像檔都由很多層次構成，Docker 使用 [Union FS](http://en.wikipedia.org/wiki/UnionFS) 將這些不同的層結合到一個映像檔中去。

通常 Union FS 有兩個用途，一方面可以實作不借助 LVM、RAID 將多個 disk 掛到同一個目錄下，另一個更常用的就是將一個唯讀的分支和一個可寫的分支聯合在一起，Live CD 正是基於此方法可以允許在映像檔不變的基礎上允許使用者在其上進行一些寫操作。 Docker 在 AUFS 上建立的容器也是利用了類似的原理。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://philipzheng.gitbook.io/docker_practice/image/internal.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
