NAME 名称

podman-init - Initialize one or more containers
podman-init - 初始化一个或多个容器

SYNOPSIS 概要

podman init [options] container [container…]
podman init [选项] 容器 [容器...]

podman container init [options] container [container…]
podman container init [选项] 容器 [容器...]

DESCRIPTION 描述

Initialize one or more containers. You may use container IDs or names as input. Initializing a container performs all tasks necessary for starting the container (mounting filesystems, creating an OCI spec, initializing the container network) but does not start the container. If a container is not initialized, the podman start and podman run commands initialize it automatically prior to starting it. This command is intended to be used for inspecting a container’s filesystem or OCI spec prior to starting it. This can be used to inspect the container before it runs, or debug why a container is failing to run.
初始化一个或多个容器。您可以使用容器 ID 或名称作为输入。初始化容器执行启动容器所需的所有任务(挂载文件系统,创建 OCI 规范,初始化容器网络),但不启动容器。如果容器未初始化,则 podman startpodman run 命令会在启动之前自动初始化它。此命令旨在用于在启动之前检查容器的文件系统或 OCI 规范。这可用于在运行之前检查容器,或调试容器无法运行的原因。

OPTIONS 选项

--all, -a

Initialize all containers. Containers that have already initialized (including containers that have been started and are running) are ignored.
初始化所有容器。已初始化的容器(包括已启动并正在运行的容器)将被忽略。

--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 例子 ¶

Initialize specified container with a given ID.
使用给定的 ID 初始化指定的容器。

podman init 35480fc9d568

Initialize specified container with a given name.
使用给定名称初始化指定的容器。

podman init test1

Initialize 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 init --latest

SEE ALSO 参见 ¶

podman(1), podman-start(1)
podman(1),podman-start(1)

HISTORY 历史 ¶

April 2019, Originally compiled by Matthew Heon mheon@redhat.com
2019 年 4 月,最初由 Matthew Heon mheon@redhat.com 编写