> For the complete documentation index, see [llms.txt](https://book.bsdcn.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://book.bsdcn.org/handbook/di-18-zhang-oci-rong-qi/18.1.-gai-shu.md).

# 18.1.概述

[Open Container Initiative](https://opencontainers.org/)（开放容器倡议，通常简称为 `OCI`）提供了与供应商和操作系统无关的容器描述、分发和运行方式。

OCI 规范提供的这些功能可在许多不同操作系统（包括 FreeBSD）上使用。底层的虚拟化技术仍然是 FreeBSD jail，具有相同的功能集，但 OCI 工具支持额外的工作方式，并能构建基于容器的工作负载。

[14.3-RELEASE](https://www.freebsd.org/releases/14.3R/announce/) 及更高版本（包括[快照](https://download.freebsd.org/snapshots/OCI-IMAGES/)）现在包含兼容 OCI 的镜像，并且 FreeBSD 上的 [Podman](https://podman.io/) 工具包可在 amd64 和 arm64 架构上使用它们。

对于熟悉 jail 的 FreeBSD 用户，可作粗略类比：

* FreeBSD 的 `base.txz` 压缩包是容器镜像的示例。
* `jail.conf` 文件描述了所需的容器属性，或 `Containerfile`。
* 使用 `jail ..` 命令运行容器，给定文件系统路径，配合 `podman` 工具套件。

通过引入此容器栈，FreeBSD 用户既能受益于通用工具，又能获得公共和私有容器注册表以及容器专用工具和服务的广泛支持。

在 [aarch64](https://download.freebsd.org/releases/OCI-IMAGES/15.1-RELEASE/aarch64/Latest/) 和 [amd64](https://download.freebsd.org/releases/OCI-IMAGES/15.1-RELEASE/amd64/Latest/) 下载目录中，你会看到官方的 OCI 格式镜像。命名一开始可能有点令人困惑，但开始使用后就会变得合理。

相同的镜像也可通过常见的公共容器注册表获取，包括 [Docker Hub](https://hub.docker.com/u/freebsd) 和 [GitHub Container Registry](https://github.com/orgs/freebsd/packages)，但为了获得最强的信任链，你应该直接从[官方 FreeBSD 发行版](https://download.freebsd.org/releases)获取镜像，并将其导入到本地系统。

每个镜像包含标准 FreeBSD `base.txz` 发行版压缩包的子集，用于各种用例，以及常规的 FreeBSD `CHECKSUM.*` 文件，可根据 PGP 签名的发行公告验证。

这提供了非常强的来源链，可直接从 FreeBSD 发行团队验证。

```sh
CHECKSUM.SHA256
CHECKSUM.SHA512
FreeBSD-15.1-RELEASE-amd64-container-image-static.txz
FreeBSD-15.1-RELEASE-amd64-container-image-dynamic.txz
FreeBSD-15.1-RELEASE-amd64-container-image-runtime.txz
FreeBSD-15.1-RELEASE-amd64-container-image-notoolchain.txz
FreeBSD-15.1-RELEASE-amd64-container-image-toolchain.txz
```


---

# 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://book.bsdcn.org/handbook/di-18-zhang-oci-rong-qi/18.1.-gai-shu.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.
