> For the complete documentation index, see [llms.txt](https://moekiwisama-1.gitbook.io/minecraft-docker/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://moekiwisama-1.gitbook.io/minecraft-docker/docker-yu-chuan-tong-xu-ni-ji-de-qu-bie.md).

# Docker 与传统虚拟机在实现上的区别

## &#x20;原理上的区别

如果我们要在不同虚拟机上运行不同的服务，比如说我想要运行三个服务

* Minecraft 服务器
* 泰拉瑞亚
* 个人网站 （Nginx）

那么传统虚拟机的方式，我们需要在宿主机（Host）上安装 3 台虚拟机（Guest），并且再每台虚拟机中，需要安装操作系统和运行时（例如 Java）

使用抽象的图形表示是这样的

![](/files/-Mcxbzq3GDMjdtyF_bDv)

看到发现，一个虚拟机实例中，包含了应用、运行时、操作系统三个部分，也就是说，在隔离每个应用的前提下，我们多运行了3次操作系统，但是 Docker 可以使我们不运行操作系统，就可以让我们在上面运行我们需要的应用。

![](/files/-McxdT8gnfmDg0Y292hJ)

我们经常可以在其他地方看见类似这样的图片，这些解释可能还是不太好让人理解什么是 Docker，不用担心，我们可以先试试使用一下 Docker，然后回头再来理解这是什么意思。


---

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

```
GET https://moekiwisama-1.gitbook.io/minecraft-docker/docker-yu-chuan-tong-xu-ni-ji-de-qu-bie.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.
