Q2. – 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

This command is used for waiting one or more containers to stop. We have to open 2 terminals. In one of them just put docker wait and in the other try to stop the same container. We can see the first terminal with docker wait is returned 0 and stopped waiting.

docker wait renamed1 [Terminal1]

docker stop renamed1 [Terminal2]