发布日期: 2026-08-12
版本号: v6.1.0

Podman 近期版本更新主要包括:新增了 podman volume rename 命令用于重命名卷,以及 podman machine restart 命令方便重启虚拟机;podman network rm 命令增加了 --ignore 选项以忽略不存在的网络错误;podman manifest push 命令支持失败自动重试;Quadlet 容器单元新增了 ImageVolume= 配置键。变更方面,podman info 命令现在会显示主机可用内存,Pesto 根无端口转发工具支持 IPv6。修复了包括远程客户端 SSH 连接挂起、podman image scp 不支持含 @ 的用户名、podman kube play 端口绑定验证问题、Windows 与 Mac 上虚拟机启动与状态异常、podman quadlet 命令对模板单元处理错误、健康检查日志损坏、卷清理过滤器失效、事件 JSON 格式输出错误、Quadlet 生成 systemd 单元可能出现损坏、podman inspect 命令输出格式支持问题等多个错误。API 方面修复了执行会话未遵循终端尺寸参数的问题,并推进了对 Docker API v1.44 和 v1.45 的兼容性支持。同时更新了 Buildah、镜像库、存储库和公共库等依赖组件的版本。

更新内容 (中文)

功能特性

  • 新增命令 podman volume rename,用于重命名卷。通过卷驱动程序创建的卷以及当前正在被容器使用的卷无法重命名(#28189)。
  • 新增命令 podman machine restart,便于轻松重启由 podman machine 管理的虚拟机(#28366)。
  • podman network rm 命令现包含新选项 --ignore,可在尝试删除不存在的网络时抑制错误(#28363)。
  • podman manifest push 命令现包含两个新选项 --retry--retry-delay,允许在推送失败时自动重试(#28590)。
  • Quadlet .container 单元现支持新配置项 ImageVolume=,用于配置如何处理来自镜像的卷(#28875)。
  • podman generate kube 命令现支持将容器健康检查生成为 livenessProbe(存活探针)(#22095)。
  • containers.conf 新增选项 force_port_listen。在 Windows 上通过 WSL 运行 Podman 时,需设置此选项以支持从 Windows 主机进行端口转发。使用 WSL 提供程序在 Windows 上新创建的 podman machine 虚拟机将自动设置此项。

变更

  • podman info 命令现包含主机的可用空闲内存(除已用内存和总内存外)(#29116)。
  • Pesto 无根端口转发工具现支持 IPv6 端口转发,并保留源 IP。

错误修复

  • 修复了远程 Podman 客户端通过 SSH 连接到远程 Podman 服务时,某些操作可能挂起的问题(#28453)。
  • 修复了 podman image scp 命令无法与包含 @ 字符的用户名一起使用的问题(#27655)。
  • 修复了 podman kube play 命令未正确验证请求的 hostPort 绑定的问题,这会导致创建的容器使用重复的主机端口,而这些容器永远无法同时启动(#26622)。
  • 修复了在 Windows 上使用 hyperv 提供程序创建的 podman machine 虚拟机有时因设置卷挂载的竞态条件而无法正常启动的问题。
  • 修复了在 Mac 上,如果 podman machine start 命令被信号中断,podman machine 虚拟机可能处于不一致状态的问题。
  • 修复了在 Mac 上的 podman machine 虚拟机上创建尝试绑定到 1024 以下端口号的容器时,会返回无意义错误信息的问题;现在会返回清晰错误,说明无法绑定特权端口。
  • 修复了 podman quadlet listpodman quadlet rm 命令无法正确处理未实例化的模板 Quadlet 的问题。
  • 修复了 podman quadlet install 命令在指定非 Quadlet 文件时偶尔会安装失败的问题。
  • 修复了 podman quadlet install 命令在未指定 --application 选项时,不会拒绝安装包含非 Quadlet 文件的 Quadlet 的问题。
  • 修复了如果健康检查在写入文件中途被终止,其日志可能损坏,从而导致健康检查无法正常运行的问题。
  • 修复了 podman volume prune --all 命令错误地忽略标签过滤器,导致 podman volume prune --all --filter label=foo 会清理所有卷,而不仅仅是带有 foo 标签的卷的问题。
  • 修复了当服务器发送无法解码的事件时,podman events --format=json 命令会打印 null 而非错误信息的问题。
  • 修复了竞态条件可能导致 Quadlet 生成损坏的 systemd 单元的问题(#29004)。
  • 修复了 podman inspect 对于仅包含单元素命令(例如 podman run fedora bash)的容器,会在 PathArgs 中都包含该命令,而实际上应仅包含在 Path 中的问题(#29155)。
  • 修复了 podman inspect 对容器的 --format 选项未正确支持 Docker 支持的某些格式说明符(例如 {{.HostIp}} 无效,但 {{.HostIP}} 有效)的问题(#29164)。
  • 修复了 Quadlet 生成器不会将错误消息写入 STDERR 而仅写入 /dev/kmsg 的问题,这意味着错误不会通过 systemd-analyze --generators verify 或其他直接调用 systemd 生成器的工具显示。
  • 修复了在某些情况下,启动失败的容器可能无法正确清理,导致异常行为的问题(#26143)。
  • 修复了 podman kube generate 命令在非根用户且未启用 SELinux 的系统上运行时,会不当生成仅适用于根用户且启用 SELinux 系统配置的警告信息的问题(#17743)。

API

  • 修复了用于执行会话的 Compat 和 Libpod 创建端点(/containers/$CID/exec)未在执行配置中遵循 ConsoleSize 参数的问题。
  • Compat API 进行了进一步更改以改进对 Docker v1.44 API 的支持,包括弃用在该版本中移除的几个字段。
  • 已开始为实现 v1.45 API 的支持做准备。

杂项

  • 更新 Buildah 至 v1.45.0。
  • 更新镜像库至 v5.41.1。
  • 更新存储库至 v1.64.0。
  • 更新通用库至 v0.69.1。

更新内容 (原始)

Features

  • A new command has been added, podman volume rename, to allow renaming volumes. Volumes created using volume drivers and volumes that are currently used by a container cannot be renamed (#28189).
  • A new command has been added, podman machine restart, to allow easy restart of VMs managed by podman machine (#28366).
  • The podman network rm command now includes a new option, --ignore, which suppresses errors when attempting to remove networks that do not exist (#28363).
  • The podman manifest push command now includes two new options, --retry and --retry-delay, which allow pushes to be automatically retried on failure (#28590).
  • Quadlet .container units now support a new key, ImageVolume=, to configure how volumes from images are handled (#28875).
  • The podman generate kube command now includes support for generating container healthchecks as a livenessProbe (#22095).
  • A new option, force_port_listen, has been added to containers.conf. This is required to be set when running Podman on WSL to support port forwarding from the Windows host. It is automatically set on newly-created podman machine VMs on Windows using the WSL provider.

Changes

  • The podman info command now includes free memory available on the host (in addition to used memory and total memory) (#29116).
  • The Pesto rootless port forwarding tool now supports IPv6 port forwarding with source IP preservation.

Bugfixes

  • Fixed a bug where the remote Podman client could hang on some operations when connecting to a remote Podman service over SSH (#28453).
  • Fixed a bug where the podman image scp command could not be used with usernames containing an @ character (#27655).
  • Fixed a bug where the podman kube play command did not properly validate requested hostPort bindings, allowing the creation of containers with duplicated host ports which would never be able to start at the same time (#26622).
  • Fixed a bug where podman machine VMs on Windows created using the hyperv provider would sometimes not properly start due to a race conditioning setting up volume mounts.
  • Fixed a bug where podman machine VMs on Mac where machines could be left in an inconsistent state if the podman machine start command was interrupted by a signal.
  • Fixed a bug where creating a container on a podman machine VM on Mac that attempted to bind to a port number number 1024 would return a nonsensical error message; a clear error explaining that privileged ports cannot be bound is now returned.
  • Fixed a bug where the podman quadlet list and podman quadlet rm commands did not function properly with uninstantiated template Quadlets.
  • Fixed a bug where the podman quadlet install command would occasionally fail to install a Quadlet if non-quadlet files were specified.
  • Fixed a bug where the podman quadlet install command would not refuse to install Quadlets including non-quadlet files if the --application option was not specified.
  • Fixed a bug where healthcheck logs could be corrupted, preventing proper healthcheck operation, if a healthcheck was killed midway through writing the file.
  • Fixed a bug where the podman volume prune --all command incorrectly discarded label filters, causing podman volume prune --all --filter label=foo to prune all volumes, not just those with the foo label.
  • Fixed a bug where the podman events --format=json command would print null instead of an error when the server sent an event that could not be decoded.
  • Fixed a bug where a race condition could cause Quadlet to generate corrupt systemd units (#29004).
  • Fixed a bug where the podman inspect command on a container with a single-element command (e.g. podman run fedora bash) would include the command in both Path and Args, when it should only have been included in Path (#29155).
  • Fixed a bug where the --format option to podman inspect on containers did not properly support some format specifiers supported by Docker (e.g. {{.HostIp}} did not work, but {{.HostIP}} did) (#29164).
  • Fixed a bug where the Quadlet generator would not write error messages to STDERR but only to /dev/kmsg, meaning that errors were not visible from systemd-analyze --generators verify and other tooling invoking the systemd generator directly.
  • Fixed a bug where containers which failed to start would, in some circumstances, not properly clean up, resulting in improper behavior (#26143).
  • Fixed a bug where the podman kube generate command would improperly generate warning messages only applicable when running as a rootless user on an SELinux enabled system when not running in that configuration (#17743).

API

  • Fixed a bug where the Compat and Libpod Create endpoint for Exec Sessions (/containers/$CID/exec) did not honor the ConsoleSize parameter in the exec config.
  • The Compat API has seen further changes to improve support for the Docker v1.44 API, including the deprecation of several fields removed in that release.
  • Preparations have begun to implement support for the v1.45 API.

Misc

  • Updated Buildah to v1.45.0
  • Updated the image library to v5.41.1
  • Updated the storage library to v1.64.0
  • Updated the common library to v0.69.1

下载链接