podman v5.7.0-rc3 版本更新介绍
发布日期: 2025-11-05
版本号: v5.7.0-rc3
Podman 近期更新带来了多项功能增强、配置改进和错误修复。在功能方面,主要更新包括远程客户端与 API 服务器支持 TLS 和 mTLS 加密连接;
podman run和podman create新增了--creds和--cert-dir选项用于镜像拉取认证;podman kube play/down支持同时处理多个文件;podman wait新增--return-on-first选项;podman machine init支持--tls-verify控制镜像验证;以及当路径共享到虚拟机时,podman image load和podman 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 ps 和 podman events 中的过滤器行为不一致、podman info 在特定挂载缺失时的崩溃、远程客户端会话输出字节丢失、podman build 忽略 SBOM 选项、--userns 选项与特定 runc 版本不兼容,以及 Windows 上 podman machine 重复拉取镜像的问题。
API 方面,新增了列出 Quadlet 的端点;调整了镜像检查接口的响应以匹配 Docker v1.45 规范;并修复了部分端点缺少 Content-Type 头的错误。
更新内容 (中文)
功能特性
- 远程 Podman 客户端和
podman system serviceAPI 服务器现在支持使用 TLS 和 mTLS 加密连接,包括通过证书进行客户端认证(#24583)。 podman system connection add命令现在可以创建使用 TLS 和 mTLS 加密的 TCP 套接字连接。podman run和podman create命令现在支持两个新选项--creds和--cert-dir,用于管理登录以拉取镜像的注册表。podman kube play和podman 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 load和podman 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文件现在支持两个新键BuildArg和IgnoreFile,用于指定构建参数和忽略文件(#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 时间戳)(现有的Size和Created字段返回人类可读的信息)(#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 create和podman 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 run、podman exec、podman attach)某些初始输出字节的错误(#26951)。 - 修复了
podman build命令忽略 SBOM 相关选项的错误(#23915)。 - 修复了
podman create和podman 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 create或podman 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 serviceAPI server now support encrypting connections with TLS and mTLS, including client authentication by certificate (#24583). - The
podman system connection addcommand can now create connections to TCP sockets with TLS and mTLS encryption. - The
podman runandpodman createcommands now support two new options,--credsand--cert-dir, to manage logging into registries to pull images. - The
podman kube playandpodman kube downcommands can now accept multiple files as input, creating or removing more than one pod or deployment with the same command (#26274). - The
podman kube playcommand 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 initcommand 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 beingtrue(TLS verification on) (#26517). - When running the
podman image loadandpodman buildcommands against apodman machineVM, 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-filelog driver can now be specified with thelog_pathoption incontainers.conf. - Default flags for the OCI runtime can now be set with the
runtimes_flagsoption incontainers.conf. - The
podman artifact removecommand can now accept multiple arguments, for example,podman artifact rm artifact1 artifact2. - The
podman waitcommand now supports a new option,--return-on-first, which causespodman waitto return after any container matches the condition, as opposed to waiting for all containers to match (#26691). - The
podman container restorecommand 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
.containerfiles now support a new key,HttpProxy, to disable the automatic forwarding of HTTP proxy options from the host into the container (#26925). - Quadlet
.podfiles now support a new key,StopTimeout, to configure the stop timeout for the pod (#27120). - Quadlet
.buildfiles now support two new keys,BuildArgandIgnoreFile, to specify build arguments and an ignore file (#27065 and #27268). - Quadlet
.kubefiles now support multiple YAML files in a single.kubefile. - Quadlet now supports templated dependencies for volumes and networks (#25136).
- The
podman quadlet installcommand now supports a new option,--replace, which will replace any existing Quadlet with a conflicting name (#26930). - The
podman quadlet printcommand now has a new alias,podman quadlet cat(#27296). - The remote Podman client’s
podman artifact removecommand now supports the--alloption. - The
podman artifact addcommand now supports a new option,--replace, which will replace any existing artifact with the given name (#27082). - The
podman artifact rmcommand now supports a new option,--ignore, which will suppress errors when attempting to remove an artifact that does not exist (#27084). - The
podman artifact listcommand now includes artifact creation time in its output (#27314). - The
podman artifact list --formatoption now supports two new format keys,VirtualSize, returning the size of the artifact in integer bytes, andCreatedAt, returning the time the artifact was created as an RFC3339 timestamp (the existingSizeandCreatedfields returned human-readable information) (#27085). - The
podman artifact inspectcommand 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=trueenvironment 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/--publishand--network=ns:/pathoptions are used together when creating a container, Podman will not warn that the-poption 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 statscommand now provides additional information about container resource utilization when run on FreeBSD. - Shell autocompletion has been enabled for the
--sysctloption topodman createandpodman run, and the--interface-nameoption topodman network create. - Artifacts created by Podman now include a creation timestamp by default, stored in the
org.opencontainers.image.createdannotation (#27081). - The
podman inspectcommand can now inspect artifacts. - The
podman artifact addcommand can now override theorg.opencontainers.image.titleannotation in created artifacts. - Podman can now optionally be built with Sequoia-PGP support. When so built, the
--sign-by-sq-fingerprintoption allows signing images using Seqoia-PGP keys.
Bugfixes
- Fixed a bug where the
--filter ancestor=option topodman psrequired complete matches, unlike Docker (which matched substrings) (#26623). - Fixed a bug where the
--filter label=option topodman eventsdid not support key-only matches (aspodman os --filter label=does) (#26702). - Fixed a bug where Quadlet could panic when a
Mountwas given without asourcebeing specified. - Fixed a bug where Quadlet would fail to generate for a
.buildfile when a systemd specifier was used in the[Build]section (#26746). - Fixed a bug where the
podman infocommand could panic when/proc/sys/fs/binfmt_miscwas 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 buildcommand was ignoring SBOM related options (#23915). - Fixed a bug where the
--userns=ns:/pathoption topodman createandpodman runwas broken with runc 1.1.11 and higher (#27148). - Fixed a bug where
podman machineon 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
ContainerConfigfield. To access image configuration, use theConfigfield 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-Typeheader.
Misc
- Error messages returned when an incomplete
--deviceoption (for example--device /dev/fuse::) is passed topodman createorpodman runhave 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.
下载链接
- podman-5.7.0-rc3-setup.exe
- podman-installer-macos-amd64.pkg
- podman-installer-macos-arm64.pkg
- podman-installer-macos-universal.pkg
- podman-installer-windows-amd64.exe
- podman-installer-windows-amd64.msi
- podman-installer-windows-arm64.exe
- podman-installer-windows-arm64.msi
- podman-remote-release-darwin_amd64.zip
- podman-remote-release-darwin_arm64.zip
- podman-remote-release-windows_amd64.zip
- podman-remote-release-windows_arm64.zip
- podman-remote-static-linux_amd64.tar.gz
- podman-remote-static-linux_arm64.tar.gz
- shasums