NAME¶ 名称
podman-start - Start one or more containers
podman-start - 启动一个或多个容器
SYNOPSIS¶ 概要
podman start [options] container …
podman start [选项] 容器 ..
podman container start [options] container …
podman 容器启动[选项]容器...
DESCRIPTION¶ 描述
Start one or more containers using container IDs or names as input. The attach and interactive
options cannot be used to override the --tty and --interactive options from when the container
was created. Starting an already running container with the --attach option, Podman simply
attaches to the container.
使用容器 ID 或名称作为输入启动一个或多个容器。无法使用 attach 和 interactive 选项来覆盖创建容器时的--tty 和--interactive 选项。使用--attach 选项启动已经运行的容器时,Podman 只是附加到容器。
OPTIONS¶ 选项
--all¶
Start all the containers, default is only running containers.
启动所有容器,默认仅启动运行中的容器。
--attach, -a¶
Attach container’s STDOUT and STDERR. The default is false. This option cannot be used when
starting multiple containers.
附加容器的 STDOUT 和 STDERR。默认值为 false。在启动多个容器时无法使用此选项。
--detach-keys=sequence¶ --detach-keys=序列
Specify the key sequence for detaching a container. Format is a single character [a-Z]
or one or more ctrl-<value>
characters where <value>
is one of: a-z
, @
, ^
, [
, ,
or _
. Specifying “” disables this feature. The default is ctrl-p,ctrl-q.
指定分离容器的键序列。格式为单个字符 [a-Z]
或一个或多个 ctrl-<value>
字符,其中 <value>
是以下之一: a-z
, @
, ^
, [
, ,
或 _
。指定“”将禁用此功能。默认为 ctrl-p,ctrl-q。
This option can also be set in containers.conf(5) file.
此选项也可以在 containers.conf(5) 文件中设置。
--filter, -f¶
Filter what containers are going to be started from the given arguments.
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] Containers created before the given duration or time. |
--interactive, -i¶ --交互式, -i ¶
When set to true, keep stdin open even if not attached. The default is false.
当设置为 true 时,即使未连接也保持 stdin 打开。默认值为 false。
--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)主机)
--sig-proxy¶
Proxy received signals to the container process. SIGCHLD, SIGURG, SIGSTOP, and SIGKILL are not proxied.
代理接收到容器进程的信号。SIGCHLD、SIGURG、SIGSTOP 和 SIGKILL 不会被代理。
The default is true when attaching, false otherwise.
在附加时默认为 true,否则为 false。
EXAMPLE¶ 例子 ¶
Start specified container:
启动指定的容器:
podman start mywebserver
Start multiple containers:
启动多个容器:
podman start 860a4b231279 5421ab43b45
Start specified container in interactive mode with terminal attached:
在交互模式下启动指定容器,并附加终端:
podman start --interactive --attach 860a4b231279
Start last created container in interactive mode (This option is not available with the remote Podman client, including Mac and Windows (excluding WSL2) machines):
在交互模式下启动最后创建的容器(此选项不适用于远程 Podman 客户端,包括 Mac 和 Windows(不包括 WSL2)机器):
podman start -i -l
SEE ALSO¶ 参见 ¶
HISTORY¶ 历史 ¶
November 2018, Originally compiled by Brent Baude bbaude@redhat.com
2018 年 11 月,最初由 Brent Baude bbaude@redhat.com 编译