What is the use of “docker wait” commands?

Docker wait command block until one or more containers stop, then print their exit codes

Usage

$ docker wait CONTAINER [CONTAINER...]