podman v5.5.0-rc2 版本更新介绍
发布日期: 2025-05-01
版本号: v5.5.0-rc2
这是Podman v5.5.0的第二个发布候选版。此版本引入了多项新功能,例如用于复制文件的
podman machine cp命令、用于提取OCI制品的podman artifact extract命令,以及支持通过--mount type=artifact将OCI制品挂载到容器中。现有命令如podman artifact add、podman exec等也增加了新选项。Podman现在会为密钥的创建和删除生成事件,并新增了--cdi-spec-dir全局选项。Quadlet单元文件支持了更多配置键,如Memory=和Retry。在变更方面,构建要求升级至Go 1.23,健康检查机制得到重构以提升性能,并新增了stopped状态。Pod内容器现在按依赖关系顺序停止,而Podman默认不再为Pod基础容器使用暂停镜像。为了安全强化,部分/proc和/sys路径在容器中被默认屏蔽。此版本修复了大量错误,涉及健康检查、远程客户端挂载、podman exec、网络操作、Kubernetes YAML生成等多个方面。API修复解决了Rootless模式下兼容API忽略ulimits的问题。此外,版本更新了Buildah、containers/common、containers/image和containers/storage等依赖库。
更新内容 (中文)
这是 Podman v5.5.0 的第二个候选版本。初步发布说明如下:
功能
- 新增了
podman machine cp命令,用于将文件复制到运行中的podman machine虚拟机。 - 新增了
podman artifact extract命令,用于将 OCI 制品的部分或全部内容复制到磁盘上的指定位置。 podman create、podman run和podman pod create的--mount选项现在支持新的挂载类型--mount type=artifact,用于将 OCI 制品挂载到容器中。podman artifact add命令现在包含两个新选项:--append(用于向现有制品添加新文件)和--file-type(用于指定添加到制品的文件的 MIME 类型)(#25884)。podman artifact rm命令现在包含一个新选项--all,用于删除本地存储中的所有制品。podman pause、podman ps、podman restart、podman rm、podman start、podman stop和podman unpause的--filter选项现在接受新的过滤器command,它根据容器中运行的命令的第一个元素(argv[0])进行过滤。podman exec命令现在支持新选项--cidfile,用于通过文件指定要执行命令的容器 ID(#21256)。podman kube generate和podman kube play命令现在支持新的注解io.podman.annotation.pids-limit/$containername,用于在kube generate和kube play之间保留容器的 PID 限制(#24418)。- Quadlet
.container单元现在支持三个新键:Memory=(为创建的容器设置最大内存)、ReloadCmd(通过 systemdExecReload执行命令)和ReloadSignal(通过 systemdExecReload用给定信号终止容器)(#22036)。 - Quadlet
.container、.image和.build单元现在支持两个新键:Retry(镜像拉取失败时重试的次数)和RetryDelay(重试之间的延迟)(#25109)。 - Quadlet
.pod单元现在支持新键HostName=,用于设置 Pod 的主机名(#25639)。 - Quadlet 文件现在在
Install部分支持新选项UpheldBy,对应于 systemd 的Upholds选项。 - 指定为 systemd 依赖项的 Quadlet 单元名称现在会自动翻译——例如,
Wants=my.container现在是有效的。 - Podman 现在会为密钥的创建和删除生成事件(#24030)。
- Podman 新增了一个全局选项
--cdi-spec-dir,用于向 CDI 加载器指定 CDI 规范的附加搜索路径(#18292 和 #25691)。 podman build命令现在支持新选项--inherit-labels(默认为 true),用于控制标签是否从基础镜像或基础阶段继承。podman update命令现在支持两个新选项--env和--unsetenv,用于更改现有容器的环境变量(#24875)。
破坏性变更
- 由于 Docker API 类型的更改,REST API 的 Go 绑定中进行了一些小的破坏性更改。
containers.Commit()函数现在返回一个新的结构体(types.IDResponse),其内容与旧结构体相同,而containers.ExecCreate函数的handlers.ExecCreateConfig参数现在包含一个不同的嵌入式结构体,这可能需要更改其赋值方式。
变更
- Podman 现在至少需要 Go 1.23 才能构建。
- 健康检查经过重构,以尽可能避免写入数据库,大大提高了在有大量并行健康检查运行时的系统性能。
- 健康检查现在有一个新的状态
stopped,如果运行健康检查的容器在检查完成前停止,则会报告此状态(#25276)。 - Pod 中的容器现在会根据其依赖关系顺序停止,基础容器最后停止,从而防止应用容器在基础容器过早停止之前因基础容器停止而丢失网络。
- 由于处理自动安装的挑战,Windows 安装程序现在不再安装 WSLv2 或 Hyper-V。
- Quadlet 现在将在跳过行时打印警告,以帮助识别格式错误的 Quadlet 文件(#25339)。
- 现在不允许创建在虚拟机的
/tmp目录上具有主机挂载的podman machine虚拟机(#18230)。 podman logs命令现在允许在容器名称之后指定选项(例如podman logs $containername --follow)(#25653)。- Podman 默认不再为 Pod 基础容器和服务容器使用暂停镜像。相反,将使用仅包含
catatonit二进制文件的根文件系统(#23292)。 podman system reset命令现在不再删除用户的podman.sockAPI 套接字。- 使用 Netavark v1.15 及更高版本时,非默认网络中的容器将不再添加默认搜索域
dns.podman。解析此类名称的查询仍将有效。 - 停止 Quadlet
.network单元现在会删除网络(如果没有容器正在主动使用它)(#23678)。 - 为了安全加固,
/proc/interrupts和/sys/devices/system/cpu/$CPU/thermal_throttle路径现在默认在容器中被屏蔽(#25634)。
错误修复
- 修复了容器暂停时健康检查仍会运行的错误(#24590)。
- 修复了 Windows 上的远程 Podman 客户端无法将名称为单个字符的具名卷挂载到容器中的错误(#25218)。
- 修复了在没有
CAP_SYS_ADMIN权限的情况下挂载镜像可能导致 panic 的错误(#25241)。 - 修复了 Podman 在设置健康检查时不会报告错误的错误(#25034)。
- 修复了
podman exec命令不会添加运行 exec 会话的用户的附加组的错误,除非用户通过--user选项显式添加(#25610)。 - 修复了
podman network connect和podman network disconnect命令期间的错误可能导致数据库中出现错误,从而使podman inspect对该容器操作失败的问题。 - 修复了
podman kube generate命令未能为使用子路径的卷挂载正确生成 YAML 的错误。 - 修复了
podman system df命令可能显示负的可回收大小的错误。 - 修复了使用
podman machine ssh命令访问非podman-machine-default(默认虚拟机)的有根podman machine虚拟机时,会将用户置于无根 shell 的错误(#25332)。 - 修复了
podman machine init在尝试创建内存大于系统可用内存的机器时,会在错误消息中报告无意义的内存值的错误。 - 修复了远程 Podman 客户端的
podman start --attach命令在使用--rm选项创建的容器上运行时错误地打印错误的错误(#25965)。 - 修复了远程 Podman 客户端的
podman pull命令在服务器意外停止或在拉取过程中遇到错误时可能挂起并泄漏内存的错误。 - 修复了远程 Podman 客户端的
podman cp命令在 Windows 上由于 Windows 路径处理不当经常导致无法将文件复制到容器中的错误(#14862)。 - 修复了
podman container clone命令未能将健康检查设置正确复制到新容器的错误(#21630)。 - 修复了
podman kube play命令无法启动空 Pod 的错误(#25786)。 - 修复了
podman volume ls命令在没有卷时不输出标题的错误(#25911)。 - 修复了除非在创建容器时指定
--health-cmd选项,否则无法覆盖容器镜像提供的健康检查配置的错误(#20212)。 - 修复了
podman create和podman run的--user选项无法与通过--hostuser选项添加到容器的用户一起使用的错误(#25805)。 - 修复了 FreeBSD 上的
podman system reset命令错误地打印错误的错误。 - 修复了使用 SIGINT 停止
podman machine start命令可能导致机器状态错误设置为 “Starting” 的错误(#24416)。
API
- 修复了在 Podman 无根运行时,容器的 Compat Create API 忽略请求中指定的 ulimits 的错误(#25881)。
杂项
- 静音了 REST API 的 Go 绑定中
ExecStartAndAttach()函数的错误报告,该函数在 exec 会话停止后 stdin 被消费时会错误地报告错误(#25344)。 - 将 Buildah 更新至 v1.40.0
- 将 containers/common 库更新至 v0.63.0
- 将 containers/image 库更新至 v5.35.0
- 将 containers/storage 库更新至 v1.58.0
更新内容 (原始)
This is the second release candidate of Podman v5.5.0. Preliminary release notes follow:
Features
- A new command has been added,
podman machine cp, to copy files into a runningpodman machineVM. - A new command has been added,
podman artifact extract, to copy some or all of the contents of an OCI artifact to a location on disk. - The
--mountoption topodman create,podman run, andpodman pod createnow supports a new mount type,--mount type=artifact, to mount OCI artifacts into containers. - The
podman artifact addcommand now features two new options,--append(to add new files to an existing artifact) and--file-type(to specify the MIME type of the file added to the artifact) (#25884). - The
podman artifact rmcommand now features a new option,--all, to remove all artifacts in the local store. - The
--filteroption topodman pause,podman ps,podman restart,podman rm,podman start,podman stop, andpodman unpausenow accepts a new filter,command, which filters on the first element (argv[0]) of the command run in the container. - The
podman execcommand now supports a new option,--cidfile, to specify the ID of the container to exec into via a file (#21256). - The
podman kube generateandpodman kube playcommands now supports a new annotation,io.podman.annotation.pids-limit/$containername, preserving the PID limit for containers acrosskube generateandkube play(#24418). - Quadlet
.containerunits now support three new keys,Memory=(set maximum memory for the created container),ReloadCmd(execute a command via systemdExecReload), andReloadSignal(kill the container with the given signal via systemdExecReload) (#22036). - Quadlet
.container,.image, and.buildunits now support two new keys,Retry(number of times to retry pulling image on failure) andRetryDelay(delay between retries) (#25109). - Quadlet
.podunits now support a new key,HostName=, to set the pod’s hostname (#25639). - Quadlet files now support a new option,
UpheldBy, in theInstallsection, corresponding to the systemdUpholdsoption. - The names of Quadlet units specified as systemd dependencies are now automatically translated - e.g.
Wants=my.containeris now valid. - Podman now generates events for the creation and removal of secrets (#24030).
- A new global option has been added to Podman,
--cdi-spec-dir, to specify additional search paths for CDI specs to the CDI loader (#18292 and #25691). - The
podman buildcommand now supports a new option,--inherit-labels(defaults to true), which controls whether labels are inherited from the base image or base stages. - The
podman updatecommand now supports two new options,--envand--unsetenv, to alter the environment variables of existing containers (#24875).
Breaking Changes
- Due to changes in Docker API types, two small breaking changes have been made in the Go bindings for the REST API. The
containers.Commit()function now returns a new struct (types.IDResponse) with identical contents, and thecontainers.ExecCreatefunction’shandlers.ExecCreateConfigparameter now contains a different embedded struct, potentially requiring changes to how it is assigned to.
Changes
- Podman now requires at least Go 1.23 to build.
- Healthchecks have been refactored to avoid writing to the database as much as possible, greatly improving performance on systems with many simultaneous healthchecks running.
- Healthchecks now have a new status,
stopped, which is reported if the container the healthcheck was run on stopped before the check could be completed (#25276). - Containers in pods are now stopped in order based on their dependencies, with the infra container being stopped last, preventing application containers from losing networking before they are stopped due to the infra container stopping prematurely.
- Due to challenges with handling automatic installation, the Windows installer no longer installs WSLv2 or Hyper-V.
- Quadlet will now print warnings when skipping lines to help identify malformed Quadlet files (#25339).
- Creating
podman machineVMs with a host mount over the VM’s/tmpdirectory is no longer allowed (#18230). - The
podman logscommand now allows options to be specified after the container name (e.g.podman logs $containername --follow) (#25653). - Podman, by default, no longer uses a pause image for pod infra and service containers. Instead, a root filesystem containing only the
catatonitbinary will be used (#23292). - The
podman system resetcommand no longer removes the user’spodman.sockAPI socket. - When using Netavark v1.15 and higher, containers in non-default networks will no longer have the default search domain
dns.podmanadded. Queries resolving such names will still work. - Stopping a Quadlet
.networkunit will now delete the network (if no containers are actively using it) (#23678). - For security hardening, the
/proc/interruptsand/sys/devices/system/cpu/$CPU/thermal_throttlepaths are now masked by default in containers (#25634).
Bugfixes
- Fixed a bug where healthchecks would still run while a container was paused (#24590).
- Fixed a bug where the remote Podman client on Windows could not mount named volumes with a single-character name into containers (#25218).
- Fixed a bug where mounting an image could panic when run without
CAP_SYS_ADMIN(#25241). - Fixed a bug where Podman would not report errors when setting up healthchecks (#25034).
- Fixed a bug where the
podman execcommand would not add the additional groups of the user the exec session was run as unless the user was explicitly added with the--useroption (#25610). - Fixed a bug where errors during the
podman network connectandpodman network disconnectcommands could create errors in the database which would causepodman inspecton the container to fail. - Fixed a bug where the
podman kube generatecommand did not correctly generate YAML for volume mounts using a subpath. - Fixed a bug where the
podman system dfcommand could show a negative reclaimable size. - Fixed a bug where accessing a rootful
podman machineVM that was notpodman-machine-default(the default VM) with thepodman machine sshcommand would put the user into the rootless shell (#25332). - Fixed a bug where the
podman machine initwould report nonsensical memory values in error messages when trying to create a machine with more memory than the system. - Fixed a bug where the remote Podman client’s
podman start --attachcommand would incorrectly print an error when run on a container created with the--rmoption (#25965). - Fixed a bug where the remote Podman client’s
podman pullcommand could hang and leak memory if the server was unexpectedly stopped or encountered an error during a pull. - Fixed a bug where the remote Podman client’s
podman cpcommand would, on Windows, often fail to copy files into the container due to improper handling of Windows paths (#14862). - Fixed a bug where the
podman container clonecommand did not correctly copy healthcheck settings to the new container (#21630). - Fixed a bug where the
podman kube playcommand would fail to start empty pods (#25786). - Fixed a bug where the
podman volume lscommand did not output headers when no volumes were present (#25911). - Fixed a bug where healthcheck configuration provided by a container’s image could not be overridden unless the
--health-cmdoption was specified when creating the container (#20212). - Fixed a bug where the
--useroption topodman createandpodman runcould not be used with users added to the container by the--hostuseroption (#25805). - Fixed a bug where the
podman system resetcommand on FreeBSD would incorrectly print an error. - Fixed a bug where stopping the
podman machine startcommand with SIGINT could result in machine state being incorrectly set to “Starting” (#24416).
API
- Fixed a bug where the Compat Create API for Containers ignored ulimits specified in the request when Podman was run rootless (#25881).
Misc
- Erroneous errors from the
ExecStartAndAttach()function in the Go bindings for the REST API have been silenced, where the function would incorrectly report errors when stdin was consumed after the exec session was stopped (#25344). - Updated Buildah to v1.40.0
- Updated the containers/common library to v0.63.0
- Updated the containers/image library to v5.35.0
- Updated the containers/storage library to v1.58.0
下载链接
- podman-5.5.0-rc2-setup.exe
- podman-installer-macos-amd64.pkg
- podman-installer-macos-arm64.pkg
- podman-installer-macos-universal.pkg
- podman-remote-release-darwin_amd64.zip
- podman-remote-release-darwin_arm64.zip
- podman-remote-release-windows_amd64.zip
- podman-remote-static-linux_amd64.tar.gz
- podman-remote-static-linux_arm64.tar.gz
- shasums