Wait Command

Difficulty: Intermediate

Question

What does 'docker wait' do?

Answer

It blocks until a container stops, then prints its exit code. Useful for automation scripts.

Concepts covered

Scripts, Lifecycle