发布日期: 2025-11-05
版本号: v5.7.0-rc3

Podman 近期更新带来了多项功能增强、配置改进和错误修复。在功能方面,主要更新包括远程客户端与 API 服务器支持 TLS 和 mTLS 加密连接;podman runpodman create 新增了 --creds--cert-dir 选项用于镜像拉取认证;podman kube play/down 支持同时处理多个文件;podman wait 新增 --return-on-first 选项;podman machine init 支持 --tls-verify 控制镜像验证;以及当路径共享到虚拟机时,podman image loadpodman build 的性能得到优化。配置上,现可在 containers.conf 中设置 k8s-file 日志驱动的默认路径和 OCI 运行时的默认标志。命令行工具方面,podman artifact 系列命令得到了扩展,支持更多参数和选项,podman inspect 可检查制品,podman container restore 新增 --tcp-close 选项。Quadlet 也有显著更新,新增 .artifact 文件类型,并在 .container.pod.build.kube 文件中支持了新的配置键,且引入了卷和网络的模板化依赖。

变更方面,为计划中的 BoltDB 移除添加了可见的警告提示;引入了更简洁的 Windows 新安装程序;要求 Go 1.24;当同时使用 -p--network=ns: 选项时,现在会提示 -p 选项将被忽略。此外,更新了多个依赖库,并改进了 Shell 自动补全功能。

修复了多个错误,包括 podman pspodman events 中的过滤器行为不一致、podman info 在特定挂载缺失时的崩溃、远程客户端会话输出字节丢失、podman build 忽略 SBOM 选项、--userns 选项与特定 runc 版本不兼容,以及 Windows 上 podman machine 重复拉取镜像的问题。

API 方面,新增了列出 Quadlet 的端点;调整了镜像检查接口的响应以匹配 Docker v1.45 规范;并修复了部分端点缺少 Content-Type 头的错误。

更新内容 (中文)

功能特性

  • 远程 Podman 客户端和 podman system service API 服务器现在支持使用 TLS 和 mTLS 加密连接,包括通过证书进行客户端认证(#24583)。
  • podman system connection add 命令现在可以创建使用 TLS 和 mTLS 加密的 TCP 套接字连接。
  • podman runpodman create 命令现在支持两个新选项 --creds--cert-dir,用于管理登录以拉取镜像的注册表。
  • podman kube playpodman kube down 命令现在可以接受多个文件作为输入,使用同一命令创建或移除多个 Pod 或部署(#26274)。
  • podman kube play 命令现在支持一个新选项 --no-pod-prefix,用于禁止在容器名称前添加 Pod 名称前缀。请注意,如果 Pod 与容器同名,这可能会导致 Pod 创建失败(#26396)。
  • podman machine init 命令现在支持一个新选项 --tls-verify,用于控制是否可以从没有受信任 TLS 证书的注册表拉取机器镜像,默认值为 true(启用 TLS 验证)(#26517)。
  • 当针对 podman machine 虚拟机运行 podman image loadpodman build 命令时,如果被加载或构建的路径已共享到虚拟机中,Podman 将从虚拟机的文件系统加载数据,而不是通过 REST API 流式传输数据,从而提高性能(#26321)。
  • 现在可以通过 containers.conf 中的 log_path 选项指定使用 k8s-file 日志驱动程序时容器日志文件的默认位置。
  • 现在可以通过 containers.conf 中的 runtimes_flags 选项设置 OCI 运行时的默认标志。
  • podman artifact remove 命令现在可以接受多个参数,例如 podman artifact rm artifact1 artifact2
  • podman wait 命令现在支持一个新选项 --return-on-first,它导致 podman wait任何容器匹配条件后返回,而不是等待所有容器匹配(#26691)。
  • podman container restore 命令现在支持一个新选项 --tcp-close,允许多次恢复具有活动 TCP 连接的容器。
  • Quadlet 现在支持一种新文件类型 .artifact,允许使用 Quadlet 管理 OCI 制品(#25778)。
  • Quadlet .container 文件现在支持一个新键 HttpProxy,用于禁止将主机的 HTTP 代理选项自动转发到容器中(#26925)。
  • Quadlet .pod 文件现在支持一个新键 StopTimeout,用于配置 Pod 的停止超时(#27120)。
  • Quadlet .build 文件现在支持两个新键 BuildArgIgnoreFile,用于指定构建参数和忽略文件(#27065#27268)。
  • Quadlet .kube 文件现在支持在单个 .kube 文件中包含多个 YAML 文件。
  • Quadlet 现在支持卷和网络的模板化依赖项(#25136)。
  • podman quadlet install 命令现在支持一个新选项 --replace,它将替换任何具有冲突名称的现有 Quadlet(#26930)。
  • podman quadlet print 命令现在有一个新别名 podman quadlet cat#27296)。
  • 远程 Podman 客户端的 podman artifact remove 命令现在支持 --all 选项。
  • podman artifact add 命令现在支持一个新选项 --replace,它将替换任何具有给定名称的现有制品(#27082)。
  • podman artifact rm 命令现在支持一个新选项 --ignore,它将抑制尝试移除不存在的制品时出现的错误(#27084)。
  • podman artifact list 命令现在在其输出中包含制品的创建时间(#27314)。
  • podman artifact list --format 选项现在支持两个新的格式键:VirtualSize(返回制品以整数字节表示的大小)和 CreatedAt(返回制品创建时间的 RFC3339 时间戳)(现有的 SizeCreated 字段返回人类可读的信息)(#27085)。
  • podman artifact inspect 命令现在支持一个新选项 --format,用于以用户指定的格式返回关于制品的特定信息(#27112)。

变更

  • 为计划在 Podman 6.0 中移除 BoltDB 数据库做准备,为仍在使用 BoltDB 的安装添加了警告。这些警告在 Podman 5.6 中已添加,但默认不可见;现在默认可见。可以通过环境变量 SUPPRESS_BOLTDB_WARNING=true 来抑制它们。
  • 引入了新的 Windows 安装程序,采用更简单的单一 MSI 架构,支持用户范围(不需要管理员权限)和机器范围安装。注意:要使用新安装程序,用户必须先卸载现有的 Podman 安装,但所有容器、镜像、机器和其他数据将被保留。仍提供旧安装程序以确保向后兼容性,但将在未来版本中移除(#22994#25968)。
  • Podman 现在要求 Go 1.24。
  • 当创建容器时同时使用 -p/--publish--network=ns:/path 选项时,Podman 不会再警告 -p 选项将被忽略,因为正在使用现有的命名空间(这一直如此,但 Podman 现在会打印相关警告)(#26663)。
  • podman stats 命令现在在 FreeBSD 上运行时,提供关于容器资源利用率的附加信息。
  • 已为 podman createpodman run--sysctl 选项以及 podman network create--interface-name 选项启用 Shell 自动补全。
  • Podman 创建的制品现在默认包含创建时间戳,存储在 org.opencontainers.image.created 注解中(#27081)。
  • podman inspect 命令现在可以检查制品。
  • podman artifact add 命令现在可以覆盖所创建制品中的 org.opencontainers.image.title 注解。
  • Podman 现在可以选择使用 Sequoia-PGP 支持进行构建。构建时,--sign-by-sq-fingerprint 选项允许使用 Sequoia-PGP 密钥对镜像进行签名。

错误修复

  • 修复了 podman ps--filter ancestor= 选项需要完全匹配(而 Docker 匹配子字符串)的错误(#26623)。
  • 修复了 podman events--filter label= 选项不支持仅键匹配(而 podman os --filter label= 支持)的错误(#26702)。
  • 修复了在提供 Mount 而未指定 source 时 Quadlet 可能发生 panic 的错误。
  • 修复了在 [Build] 部分使用 systemd 说明符时,Quadlet 无法为 .build 文件生成的错误(#26746)。
  • 修复了当 /proc/sys/fs/binfmt_misc 未挂载时 podman info 命令可能 panic 的错误。
  • 修复了远程 Podman 客户端可能由于竞态条件而丢失附加会话(podman runpodman execpodman attach)某些初始输出字节的错误(#26951)。
  • 修复了 podman build 命令忽略 SBOM 相关选项的错误(#23915)。
  • 修复了 podman createpodman run--userns=ns:/path 选项在 runc 1.1.11 及更高版本中失效的错误(#27148)。
  • 修复了在 Windows 上使用 WSL 提供程序时 podman machine 即使镜像已拉取并存在于磁盘上,也总是重新拉取机器镜像的错误。

API

  • 添加了一个列出 quadlets 的新 API 端点(GET /libpod/quadlets/json)。
  • 镜像的 Compat Inspect 端点不再包含 ContainerConfig 字段。要访问镜像配置,请使用 Config 字段。这与 Docker 在 v1.45 API 中所做的更改一致。
  • 修复了容器(兼容和 libpod)的 Stats 和 Commit 端点、镜像(兼容和 libpod)的 Push、Commit 和 Pull 端点以及清单(libpod)的 Push 端点未返回 Content-Type 头的错误。

杂项

  • 改进了当不完整的 --device 选项(例如 --device /dev/fuse::)传递给 podman createpodman run 时返回的错误消息。
  • 将 Buildah 更新到 v1.42.0
  • 将 containers/image 库更新到 v5.38.0
  • 将 containers/storage 库更新到 v1.61.0
  • 将 containers/common 库更新到 v0.66.0
  • containers/image、containers/storage 和 containers/common 库现在来自 containers/container-libs 单一代码仓库。

更新内容 (原始)

Features

  • The remote Podman client and podman system service API server now support encrypting connections with TLS and mTLS, including client authentication by certificate (#24583).
  • The podman system connection add command can now create connections to TCP sockets with TLS and mTLS encryption.
  • The podman run and podman create commands now support two new options, --creds and --cert-dir, to manage logging into registries to pull images.
  • The podman kube play and podman kube down commands can now accept multiple files as input, creating or removing more than one pod or deployment with the same command (#26274).
  • The podman kube play command now supports a new option, --no-pod-prefix, to disable prefixing container names with pod names. Please note that this can cause pods to fail to create if the pod shares a name with a container (#26396).
  • The podman machine init command now supports a new option, --tls-verify, to control whether the machine image can be pulled from registries without a trusted TLS certificate, with the default being true (TLS verification on) (#26517).
  • When running the podman image load and podman build commands against a podman machine VM, if the path being loaded or built is shared into the VM, Podman will load it from the VM’s filesystem instead of streaming the data through the REST API, improving performance (#26321).
  • A default location for container log files when using the k8s-file log driver can now be specified with the log_path option in containers.conf.
  • Default flags for the OCI runtime can now be set with the runtimes_flags option in containers.conf.
  • The podman artifact remove command can now accept multiple arguments, for example, podman artifact rm artifact1 artifact2.
  • The podman wait command now supports a new option, --return-on-first, which causes podman wait to return after any container matches the condition, as opposed to waiting for all containers to match (#26691).
  • The podman container restore command now supports a new option, --tcp-close, allowing containers with active TCP connections to be restored multiple times.
  • Quadlet now features support for a new file type, .artifact, allowing OCI artifacts to be managed with Quadlet (#25778).
  • Quadlet .container files now support a new key, HttpProxy, to disable the automatic forwarding of HTTP proxy options from the host into the container (#26925).
  • Quadlet .pod files now support a new key, StopTimeout, to configure the stop timeout for the pod (#27120).
  • Quadlet .build files now support two new keys, BuildArg and IgnoreFile, to specify build arguments and an ignore file (#27065 and #27268).
  • Quadlet .kube files now support multiple YAML files in a single .kube file.
  • Quadlet now supports templated dependencies for volumes and networks (#25136).
  • The podman quadlet install command now supports a new option, --replace, which will replace any existing Quadlet with a conflicting name (#26930).
  • The podman quadlet print command now has a new alias, podman quadlet cat (#27296).
  • The remote Podman client’s podman artifact remove command now supports the --all option.
  • The podman artifact add command now supports a new option, --replace, which will replace any existing artifact with the given name (#27082).
  • The podman artifact rm command now supports a new option, --ignore, which will suppress errors when attempting to remove an artifact that does not exist (#27084).
  • The podman artifact list command now includes artifact creation time in its output (#27314).
  • The podman artifact list --format option now supports two new format keys, VirtualSize, returning the size of the artifact in integer bytes, and CreatedAt, returning the time the artifact was created as an RFC3339 timestamp (the existing Size and Created fields returned human-readable information) (#27085).
  • The podman artifact inspect command now supports a new option, --format, to return specific information about an artifact with user-specified formatting (#27112).

Changes

  • In preparation for a planned removal of the BoltDB database in Podman 6.0, a warning has been added for installations still using BoltDB. These warnings were added in Podman 5.6, but were not visible by default; they now are. They can be suppressed with the SUPPRESS_BOLTDB_WARNING=true environment variable.
  • A new Windows installer has been introduced with a simpler single MSI architecture that supports both user-scope (no admin required) and machine-scope installations. Note: To use the new installer, users must uninstall existing Podman installations before using the new installer, but all containers, images, machines, and other data will be preserved. The old installer is still provided to ensure backwards compatibility, though it will be removed in a future release (#22994 and #25968).
  • Podman now requires Go 1.24.
  • When the -p/--publish and --network=ns:/path options are used together when creating a container, Podman will not warn that the -p option will be ignored as an existing namespace is in use (this has always been the case, but Podman now prints a warning about it) (#26663).
  • The podman stats command now provides additional information about container resource utilization when run on FreeBSD.
  • Shell autocompletion has been enabled for the --sysctl option to podman create and podman run, and the --interface-name option to podman network create.
  • Artifacts created by Podman now include a creation timestamp by default, stored in the org.opencontainers.image.created annotation (#27081).
  • The podman inspect command can now inspect artifacts.
  • The podman artifact add command can now override the org.opencontainers.image.title annotation in created artifacts.
  • Podman can now optionally be built with Sequoia-PGP support. When so built, the --sign-by-sq-fingerprint option allows signing images using Seqoia-PGP keys.

Bugfixes

  • Fixed a bug where the --filter ancestor= option to podman ps required complete matches, unlike Docker (which matched substrings) (#26623).
  • Fixed a bug where the --filter label= option to podman events did not support key-only matches (as podman os --filter label= does) (#26702).
  • Fixed a bug where Quadlet could panic when a Mount was given without a source being specified.
  • Fixed a bug where Quadlet would fail to generate for a .build file when a systemd specifier was used in the [Build] section (#26746).
  • Fixed a bug where the podman info command could panic when /proc/sys/fs/binfmt_misc was not mounted.
  • Fixed a bug where the remote Podman client could lose some initial bytes of output from attach sessions (podman run, podman exec, podman attach) due to a race condition (#26951).
  • Fixed a bug where the podman build command was ignoring SBOM related options (#23915).
  • Fixed a bug where the --userns=ns:/path option to podman create and podman run was broken with runc 1.1.11 and higher (#27148).
  • Fixed a bug where podman machine on Windows would always re-pull machine images when using the WSL provider, even if an the image had already been pulled and was present on disk.

API

  • Added a new API endpoint to list quadlets (GET /libpod/quadlets/json).
  • The Compat Inspect endpoint for Images no longer includes the ContainerConfig field. To access image configuration, use the Config field instead. This matches changes made by Docker in the v1.45 API.
  • Fixed a bug where the Stats and Commit endpoints for Containers (compat & libpod), the Push, Commit, Push, and Pull endpoints for Images (compat & libpod), and the Push endpoint for Manifests (libpod) were not returning a Content-Type header.

Misc

  • Error messages returned when an incomplete --device option (for example --device /dev/fuse::) is passed to podman create or podman run have been improved.
  • Updated Buildah to v1.42.0
  • Updated the containers/image library to v5.38.0
  • Updated the containers/storage library to v1.61.0
  • Updated the containers/common library to v0.66.0
  • The containers/image, containers/storage, and containers/common libraries are now sourced from the containers/container-libs monorepo.

下载链接