podman-wait(1)
π podman-wait(1) β General Commands Manual π
okay bestie, welcome to podman-wait, straight out of the General Commands Manual. this one is literally the "girl, just wait" command and honestly? she's iconic for it. sit down, grab a boba, let's get into it π§β¨
β¨ NAME β¨
podman-wait β wait on one or more containers to stop and print their exit codes
π¦ SYNOPSIS π¦
podman wait [options] container [...]
podman container wait [options] container [...]
πΈ DESCRIPTION πΈ
So the whole vibe is: waits on one or more containers to stop. You can point at a container by its name or by its ID, either one works, no cap.
Got multiple containers? Podman waits on each one consecutively β one after the other, no cutting the line. And once all the conditions are satisfied, the containers' return codes get printed out, separated by newline, in the same order as they were given to the command. Order matters, bestie, we respect the queue. π«Ά
An exit code of -1 is emitted for all conditions other than "stopped" and "exited". Just so you know.
π¨ ok important one. When you're waiting for containers with a restart policy ofalwaysoron-failureβ think the ones created bypodman kube playβ those containers may be repeatedly exiting and restarting, possibly with different exit codes every single time. chaotic behavior fr. In that casepodman waitwill only display and detect the first exit after the wait command was started. she's not keeping up with all that, she logs the first one and moves on π
Also: when you run a container with podman run --rm, wait does not wait for the container to be fully removed. If waiting for the removal of a container is the thing you actually want, use --condition=removing. yes really. that's the move. π
π OPTIONS π
--condition=stateβ the container state or condition you're waiting for. You can specify this multiple times, and at least one condition must match for the command to return. The supported values are"configured","created","exited","healthy","initialized","paused","removing","running","stopped","stopping","unhealthy". The default condition is"stopped". pick your fighter β¨--exit-first-matchβ wait for the exit of the first container which matches the conditions, and ignore the other ones. first come, first served, the rest can wait (ironically) π--help,-hβ print usage statement. the classic. the helpful one.--ignoreβ ignore errors when a specified container is missing, and mark its return code as-1. ghosted container? no problem, we pretend it's fine π«Ά--interval,-i=durationβ the time interval to wait before polling for completion. A duration string is a sequence of decimal numbers, each with an 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". The time unit defaults to"ms". cute little countdown energy β³--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.)
π EXAMPLES π
Wait for the specified container to exit.
$ podman wait mywebserver
0
Wait for the latest container to exit. (This option is not available with the remote Podman client, including Mac and Windows (excluding WSL2) machines)
$ podman wait --latest
0
Wait for the container to exit, checking every two seconds.
$ podman wait --interval 2s mywebserver
0
Wait for the container by ID. This container exits with error status 1:
$ podman wait 860a4b23
1
Wait for both specified containers to exit.
$ podman wait mywebserver myftpserver
0
125
Wait for the named container to exit, but do not fail if the container does not exist.
$ podman wait --ignore does-not-exist
-1
π SEE ALSO π
π HISTORY π
September 2017, Originally compiled by Brent Baude baude@redhat.com β¨mailto:bbaude@redhat.comβ©
okay that's the whole page, you ate that π go forth and wait on your containers, bestie. this was podman-wait(1) from the General Commands Manual, and if you ever need her again she's right there in your terminal. mwah πβ¨π
π¦ where this page comes from
- alpine 3.24: podman-doc 5.8.9-r0 Β· Apache-2.0
- arch rolling: podman 6.1.4-1 Β· Apache-2.0
- centos-stream 10: podman 7:6.1.0-2.el10 Β· Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND ISC AND MIT AND MPL-2.0
- centos-stream 9: podman 6:5.8.5-2.el9 Β· Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND ISC AND MIT AND MPL-2.0
- fedora 43: podman 5:5.8.4-1.fc43
- fedora 43: podman 5:5.8.8-1.fc43
- fedora 43: podman 5:5.8.9-1.fc43 Β· Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND ISC AND MIT AND MPL-2.0
- fedora 44: podman 5:5.8.1-1.fc44 Β· Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND ISC AND MIT AND MPL-2.0
- fedora 44: podman 5:5.8.7-1.fc44
- fedora 44: podman 5:5.8.9-1.fc44 Β· Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND ISC AND MIT AND MPL-2.0
- nixos 26.05: podman 5.8.9
- nixpkgs unstable: podman 6.1.4
- ubuntu resolute: podman 5.7.0+ds2-3build1 Β· Apache-2.0
- ubuntu stonking: podman 5.8.6+ds1-2 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms