Block until a container exits and print its exit code.
Section: Inspection and Debugging
Wait for container exit
bash
bash
docker wait webExplanation
Useful in scripts that need to synchronize with a container run.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Inspection and Debugging