Docker Update & wait command
The docker update command dynamically updates container configuration. You can use this command to prevent containers from consuming too many resources from their Docker host.
docker update –cpu-shares 512 23263ad49893
Block until one or more containers stop, then print their exit codes.
start the container in background
docker run -dit –name=poorani1 bash
wait for the container
docker wait poorani1
stop the container in another terminal or console
docker stop poorani1
container wait command will get the exists status.