# 虛擬機器與容器之差異

## **容器虛擬化與VM的差異**

![](https://lh6.googleusercontent.com/6mE9wylJ-bSvQIxfdulk7DGkM_iLPgs7Tm7JnEuyulQZVPDIgBY7nVFQNeBQJkzoDXxzo8wh6qY4ohVnV2n8Kb7am7n-zkGL60jT25wciyKI8xTIY5liqW4dPoeX7ar6ed3OViL_)

**Docker 包括三個基本概念**

* **映像檔（Image）**\
  Docker 映像檔就是一個唯讀的模板。\
  例如：一個映像檔可以包含一個完整的 Linux 作業系統環境，裡面僅安裝了 SSH 或使用者需要的其它應用程式。映像檔可以用來建立 Docker 容器。
* **容器（Container）**\
  Docker 利用容器來執行應用。

  容器是從映像檔建立的執行程序。它可以被啟動、開始、停止、刪除。每個容器都是相互隔離的、保證安全的平台。
* **倉庫（Repository）**\
  倉庫是集中存放映像檔檔案的場所。有時候會把倉庫和倉庫註冊伺服器（Registry）混為一談，並不嚴格區分。實際上，倉庫註冊伺服器上往往存放著多個倉庫，每個倉庫中又包含了多個映像檔，每個映像檔有不同的標籤（tag）。

  倉庫分為公開（Public）和私有（Private）兩種形式

**理解了這三個概念，就理解了 Docker 的整個生命週期。**<br>


---

# Agent Instructions: 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:

```
GET https://kawsing.gitbook.io/opensystem/docker-cong-an-zhuang-dao-ying-yong-ru-men-pian/xu-ni-ji-qi-yu-rong-qi-zhi-cha-yi.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
