发布日期: 2026-07-31
版本号: v6.1.0-rc1

Podman 近期更新引入了多项功能增强、错误修复与稳定性改进。新功能包括添加了podman volume rename命令以重命名卷,podman machine restart命令方便重启虚拟机,podman network rm新增--ignore选项忽略不存在的网络错误,podman manifest push支持--retry--retry-delay进行自动重试,Quadlet容器单元新增ImageVolume=键配置镜像卷处理方式,podman generate kube支持生成容器健康检查作为livenessProbe。变更方面,podman info现在显示主机空闲内存,Pesto工具支持IPv6端口转发与源IP保留。此外,本次更新修复了大量错误,涉及远程客户端连接、镜像传输命令对特殊用户名的支持、主机端口绑定验证、虚拟机启动与状态管理、模板Quadlet操作、健康检查日志完整性、卷清理过滤、事件错误输出、Quadlet生成器稳定性、容器检查命令的输出格式与字段处理、失败容器清理以及Kubernetes配置生成等多个方面。API层面修复了执行会话配置参数问题,并更新兼容API以适配Docker v1.44,同时为v1.45 API做准备。最后,底层依赖的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)。

变更内容

  • podman info 命令现在会显示主机可用内存(在已使用内存和总内存基础上新增)(#29116)。
  • Pesto 无损端口转发工具现支持 IPv6 端口转发并保留源 IP 地址。

错误修复

  • 修复了远程 Podman 客户端通过 SSH 连接远程服务时可能在某些操作上挂起的问题(#28453)。
  • 修复了 podman image scp 命令无法与包含 @ 字符的用户名配合使用的问题(#27655)。
  • 修复了 podman kube play 命令未正确验证 hostPort 绑定请求的问题,该问题曾导致创建具有重复主机端口的容器且这些容器永远无法同时启动(#26622)。
  • 修复了 Windows 上使用 hyperv 提供程序创建的 podman machine 虚拟机因卷挂载设置的竞态条件而偶尔无法正常启动的问题。
  • 修复了 Mac 上 podman machine 虚拟机在 podman machine start 命令被信号中断时可能处于不一致状态的问题。
  • 修复了在 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 命令在非 rootless 用户且未启用 SELinux 的配置下运行时,错误生成仅适用于 rootless 用户在 SELinux 系统下运行的警告信息的问题(#17743)。

API 接口

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

杂项

  • 更新 Buildah 至 v1.45.0
  • 更新镜像库至 v5.41.0
  • 更新存储库至 v1.64.0
  • 更新通用库至 v0.69.0

更新内容 (原始)

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).

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.0
  • Updated the storage library to v1.64.0
  • Updated the common library to v0.69.0

下载链接