github.com/hanks177/podman/v4@v4.1.3-0.20220613032544-16d90015bc83/docs/source/markdown/podman-wait.1.md (about)

     1  % podman-wait(1)
     2  
     3  ## NAME
     4  podman\-wait - Wait on one or more containers to stop and print their exit codes
     5  
     6  ## SYNOPSIS
     7  **podman wait** [*options*] *container* [...]
     8  
     9  **podman container wait** [*options*] *container* [...]
    10  
    11  ## DESCRIPTION
    12  Waits on one or more containers to stop.  The container can be referred to by its
    13  name or ID.  In the case of multiple containers, Podman will wait on each consecutively.
    14  After all specified containers are stopped, the containers' return codes are printed
    15  separated by newline in the same order as they were given to the command.
    16  
    17  ## OPTIONS
    18  
    19  #### **--condition**=*state*
    20  Condition to wait on (default "stopped")
    21  
    22  #### **--help**, **-h**
    23  
    24   Print usage statement
    25  
    26  #### **--interval**, **-i**=*duration*
    27    Time interval to wait before polling for completion. A duration string is a sequence of decimal numbers, each with optional fraction and a unit suffix, such as "300ms", "-1.5h" or "2h45m". Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h". Time unit defaults to "ms".
    28  
    29  #### **--latest**, **-l**
    30  
    31  Instead of providing the container name or ID, use the last created container. If you use methods other than Podman
    32  to run containers such as CRI-O, the last started container could be from either of those methods. (This option is not available with the remote Podman client, including Mac and Windows (excluding WSL2) machines)
    33  
    34  
    35  ## EXAMPLES
    36  
    37  ```
    38  $ podman wait mywebserver
    39  0
    40  
    41  $ podman wait --latest
    42  0
    43  
    44  $ podman wait --interval 2s
    45  0
    46  
    47  $ podman wait 860a4b23
    48  1
    49  
    50  $ podman wait mywebserver myftpserver
    51  0
    52  125
    53  ```
    54  
    55  ## SEE ALSO
    56  **[podman(1)](podman.1.md)**
    57  
    58  ## HISTORY
    59  September 2017, Originally compiled by Brent Baude<bbaude@redhat.com>