What is the use of “docker wait” commands? with example and image

DevOps

MOTOSHARE 🚗🏍️
Turning Idle Vehicles into Shared Rides & Earnings

From Idle to Income. From Parked to Purpose.
Earn by Sharing, Ride by Renting.
Where Owners Earn, Riders Move.
Owners Earn. Riders Move. Motoshare Connects.

With Motoshare, every parked vehicle finds a purpose. Owners earn. Renters ride.
🚀 Everyone wins.

Start Your Journey with Motoshare

The wait command will wait until a container stop, then print their exit codes.
How to check:
Start a container
docker run –name bitto httpd
Run docker wait
docker wait bitto
Kill the container from another terminal and check the return value in actual terminal
docker kill bitto