# 你的第一个 Docker

现在你的电脑上已经运行了 Docker，我们来创建你的第一个 Dockerfile。

在创建容器之前，你需要了解什么是容器。容器在 Linux（或 Docker Desktop 中）本地运行，与其他容器共享主机机器的内核。它运行一个独立的进程，占用的内存不超过任何其他可执行文件，使其非常轻量。

<figure><img src="/files/f6573c3844dde88fcb69400de165609fa454281b" alt=""><figcaption></figcaption></figure>

既然你已经设置好了环境，就可以开始开发容器化应用程序了。

由于关于如何创建容器的文档已经可以在线轻松获取，我们建议你参考 Docker 提供的这份关于构建和运行镜像的优秀指南：

[Docker - 入门指南](https://docs.docker.com/get-started/02_our_app/)

{% hint style="info" %}
我们建议使用你熟悉的基础镜像（[CentOS](https://hub.docker.com/_/centos), [Ubuntu](https://hub.docker.com/_/ubuntu), [Debian](https://hub.docker.com/_/debian) 或 [Alpine](https://hub.docker.com//alpine)）。我们可以毫无问题地运行所有基于 Linux 的内核。
{% endhint %}


---

# 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://docs.edgegap.com/zh/docs/tools-and-integrations/container/first-docker.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.
