1podman-wait(1)              General Commands Manual             podman-wait(1)
2
3
4

NAME

6       podman-wait  -  Wait  on one or more containers to stop and print their
7       exit codes
8
9

SYNOPSIS

11       podman wait [options] container [...]
12
13
14       podman container wait [options] container [...]
15
16

DESCRIPTION

18       Waits on one or more containers to stop.  The container can be referred
19       to by its name or ID.  In the case of multiple containers, Podman waits
20       on each consecutively.  After all conditions are  satisfied,  the  con‐
21       tainers'  return codes are printed separated by newline in the same or‐
22       der as they were given to the command.  An exit code of -1  is  emitted
23       for all conditions other than "stopped" and "exited".
24
25
26       NOTE:  there  is an inherent race condition when waiting for containers
27       with a restart policy of always or on-failure, such as those created by
28       podman  kube  play.  Such  containers  may  be  repeatedly  exiting and
29       restarting, possibly with different exit codes,  but  podman  wait  can
30       only display and detect one.
31
32

OPTIONS

34   --condition=state
35       Container  state  or  condition to wait for.  Can be specified multiple
36       times where at least one condition must match for the  command  to  re‐
37       turn.    Supported   values   are  "configured",  "created",  "exited",
38       "healthy", "initialized", "paused", "removing",  "running",  "stopped",
39       "stopping", "unhealthy".  The default condition is "stopped".
40
41
42   --help, -h
43       Print usage statement
44
45
46   --ignore
47       Ignore errors when a specified container is missing and mark its return
48       code as -1.
49
50
51   --interval, -i=duration
52       Time interval to wait before polling for completion. A duration  string
53       is  a  sequence  of  decimal numbers, each with optional fraction and a
54       unit suffix, such as "300ms", "-1.5h" or "2h45m". Valid time units  are
55       "ns", "us" (or "µs"), "ms", "s", "m", "h". Time unit defaults to "ms".
56
57
58   --latest, -l
59       Instead  of  providing  the  container name or ID, use the last created
60       container.  Note: the last started container can be from other users of
61       Podman on the host machine.  (This option is not available with the re‐
62       mote Podman client, including Mac  and  Windows  (excluding  WSL2)  ma‐
63       chines)
64
65

EXAMPLES

67       $ podman wait mywebserver
68       0
69
70       $ podman wait --latest
71       0
72
73       $ podman wait --interval 2s
74       0
75
76       $ podman wait 860a4b23
77       1
78
79       $ podman wait mywebserver myftpserver
80       0
81       125
82
83       $ podman wait --ignore does-not-exist
84       -1
85
86
87

SEE ALSO

89       podman(1)
90
91

HISTORY

93       September  2017,  Originally  compiled  by Brent Baudebbaude@redhat.com
94       ⟨mailto:bbaude@redhat.com⟩
95
96
97
98                                                                podman-wait(1)
Impressum