# 前提

> For the complete documentation index, see [llms.txt](https://www.jetbrains.com/zh-cn/help/idea/llms.txt).

## 本地 Dev Container 的先决条件

* 您有一个包含 `.devcontainer` 文件夹和 [devcontainer.json](https://containers.dev/implementors/json_reference/) 文件的项目，该文件描述了实际的 Dev Container。 目前， `devcontainer.json` 文件的代码补全功能有限。 但是，以下属性是可用的： * [构建属性](https://containers.dev/implementors/json_reference/#image-specific) 是受支持的。 * [常规属性](https://containers.dev/implementors/json_reference/#general-properties)。 * [Docker compose properties](https://containers.dev/implementors/json_reference/#compose-specific) 得到支持。 * [生命周期脚本](https://containers.dev/implementors/json_reference/#lifecycle-scripts)受支持。 * 在 [端口属性](https://containers.dev/implementors/json_reference/#port-attributes)中仅支持 `label` 。 * 不支持 [最低主机要求](https://containers.dev/implementors/json_reference/#min-host-reqs)。 * [devcontainer.json 中的变量受到支持。](https://containers.dev/implementors/json_reference/#variables-in-devcontainerjson)

* 您可以访问 GitHub。

* 您的计算机上已安装 Git 2.20.1 或更高版本。

* 您的本地计算机上有一个 [正在运行的 SSH 代理](using-ssh-keys.html)。 例如，在 Windows 上，当 您 使用 SSH URL 从 GitHub 仓库构建一个 Dev Container 时， `- git clone` 操作（将 仓库 源码克隆到连接到辅助容器的 Docker 卷）无法在没有运行 SSH 代理的情况下执行。

* 您的机器上已经安装了 [Docker](https://docs.docker.com/get-docker/)，该机器将承载 Dev Container。

* 挂载源代码的最低后端要求是已安装 Docker。 尚不支持 Docker 替代方案，例如 [Colima](https://github.com/abiosoft/colima) 或类似工具。 [Podman](https://github.com/containers/podman-compose) 支持正在开发中。 如果您在使用这些 Docker 替代方案时遇到问题，请向问题跟踪器提交错误报告。

* 您的 Docker 资源满足后端的 [最低系统要求](prerequisites.html)。

## 远程 Dev Container 的其他先决条件

以下是您在远程服务器上运行 Dev Container 所需的其他先决条件列表：

* [Docker](https://docs.docker.com/get-docker/) 已安装在远程和本地机器上。

* 通过 SSH 密钥对服务器和 Git 进行授权。 如果您使用密码连接到远程服务器，请在本地生成密钥对，然后将其转发到远程服务器。 如需了解更多信息，请参阅 [共享凭证](forward-credentials.html)。

* 远程服务器需要 Java 17 或更高版本。

* 开发容器可能需要一些额外的依赖项。 如果您的 Dev Container 无法启动，请确保 Dev Container 系统中的 `devcontainer.json` 文件包含以下依赖项： * `curl` * `unzip` * `ps` * `libxext` * `libxrender` * `libxtst` * `libxi` * `freetype` * `procps` * `gcompat`

