NAME¶ 名称
podman-container-exists - Check if a container exists in local storage
podman-container-exists - 检查本地存储中是否存在容器
SYNOPSIS¶ 概要
podman container exists [options] container
podman 容器存在 [选项] 容器
DESCRIPTION¶ 描述
podman container exists checks if a container exists in local storage. The container ID or name is used as input. Podman returns an exit code
of 0
when the container is found. A 1
is returned otherwise. An exit code of 125
indicates there was an issue accessing the local storage.
podman 容器存在检查容器是否存在于本地存储中。容器 ID 或名称用作输入。当找到容器时,Podman 返回退出码 0
。否则返回 1
。退出码 125
表示访问本地存储时出现问题。
OPTIONS¶ 选项
--external¶ --外部 ¶
Check for external containers as well as Podman containers. These external containers are generally created via other container technology such as Buildah
or CRI-O
.
检查外部容器以及 Podman 容器。这些外部容器通常是通过其他容器技术(如 Buildah
或 CRI-O
)创建的。
The default is false.
默认值为 false。
-h, --help -h,--帮助
Prints usage statement. 打印使用说明。
The default is false.
默认值为 false。
EXAMPLES¶ 示例
Check if a container called “webclient” exists in local storage. Here, the container does exist.
检查本地存储中是否存在名为“webclient”的容器。在这里,该容器确实存在。
$ podman container exists webclient
$ echo $?
0
Check if a container called “webbackend” exists in local storage. Here, the container does not exist.
检查本地存储中是否存在名为“webbackend”的容器。在这里,该容器不存在。
$ podman container exists webbackend
$ echo $?
1
Check if a container called “ubi8-working-container” created via Buildah exists in local storage. Here, the container does not exist.
检查本地存储中是否存在通过 Buildah 创建的名为“ubi8-working-container”的容器。在这里,容器不存在。
$ podman container exists --external ubi8-working-container
$ echo $?
1
SEE ALSO¶ 参见 ¶
HISTORY¶ 历史 ¶
November 2018, Originally compiled by Brent Baude bbaude@redhat.com
2018 年 11 月,最初由 Brent Baude bbaude@redhat.com 编译