Docker Container Wait
Block until one or more containers stop, then print their exit codes
Syntax
$ docker contaienr wait CONTAINER [CONTAINER...]
Examples
Run docker wait, which should block until the container exits.
$ docker wait container_name
In another terminal, stop the first container. The docker wait command above returns the exit code.
$ docker stop container_name
Other terminal: