NAME¶ 名称
podman-pause - Pause one or more containers
podman-pause - 暂停一个或多个容器
SYNOPSIS¶ 概要
podman pause [options] [container…]
podman 暂停 [选项] [容器...]
podman container pause [options] [container…]
podman 容器暂停 [选项] [容器...]
DESCRIPTION¶ 描述
Pauses all the processes in one or more containers. You may use container IDs or names as input.
暂停一个或多个容器中的所有进程。您可以使用容器 ID 或名称作为输入。
OPTIONS¶ 选项
--all, -a¶
Pause all running containers.
暂停所有正在运行的容器。
--cidfile=file¶
Read container ID from the specified file and pause the container.
Can be specified multiple times.
从指定文件中读取容器 ID 并暂停容器。可以多次指定。
--filter, -f=filter¶ --filter, -f=过滤器 ¶
Filter what containers pause.
Multiple filters can be given with multiple uses of the --filter flag.
Filters with the same key work inclusive with the only exception being
label
which is exclusive. Filters with different keys always work exclusive.
过滤哪些容器暂停。可以使用多个 --filter 标志多次给出多个过滤器。具有相同键的过滤器与唯一例外 label
一起工作,该例外是排他的。具有不同键的过滤器始终是排他的。
Valid filters are listed below:
下面列出了有效的过滤器:
Filter |
Description |
---|---|
id |
[ID] Container’s ID (CID prefix match by default; accepts regex) |
name |
[Name] Container’s name (accepts regex) |
label |
[Key] or [Key=Value] Label assigned to a container |
exited |
[Int] Container’s exit code |
status |
[Status] Container’s status: ‘created’, ‘exited’, ‘paused’, ‘running’, ‘unknown’ |
ancestor |
[ImageName] Image or descendant used to create container |
before |
[ID] or [Name] Containers created before this container |
since |
[ID] or [Name] Containers created since this container |
volume |
[VolumeName] or [MountpointDestination] Volume mounted in container |
health |
[Status] healthy or unhealthy |
pod |
[Pod] name or full or partial ID of pod |
network |
[Network] name or full ID of network |
until |
[DateTime] container created before the given duration or time. |
--latest, -l¶
Instead of providing the container name or ID, use the last created container.
Note: the last started container can be from other users of Podman on the host machine.
(This option is not available with the remote Podman client, including Mac and Windows
(excluding WSL2) machines)
不要提供容器名称或 ID,而是使用最后创建的容器。注意:最后启动的容器可能来自主机上其他 Podman 用户。(此选项在远程 Podman 客户端中不可用,包括 Mac 和 Windows(不包括 WSL2)主机)
EXAMPLE¶ 例子 ¶
Pause specified container:
暂停指定容器:
podman pause mywebserver
Pause container by partial container ID:
通过部分容器 ID 暂停容器:
podman pause 860a4b23
Pause all running containers:
暂停所有正在运行的容器:
podman pause --all
Pause container using ID specified in given files:
使用给定文件中指定的 ID 暂停容器:
podman pause --cidfile /home/user/cidfile-1
podman pause --cidfile /home/user/cidfile-1 --cidfile ./cidfile-2
Pause the latest container. (This option is not available with the remote Podman client, including Mac and Windows (excluding WSL2) machines):
暂停最新的容器。(此选项不适用于远程 Podman 客户端,包括 Mac 和 Windows(不包括 WSL2)机器):
podman pause --latest
SEE ALSO¶ 参见 ¶
podman(1), podman-unpause(1)
podman(1),podman-unpause(1)
HISTORY¶ 历史 ¶
September 2017, Originally compiled by Dan Walsh dwalsh@redhat.com
2017 年 9 月,最初由 Dan Walsh dwalsh@redhat.com 编写