PRACTICE / UNDERSTAND / REPEAT

Docker practice question

Practice container lifecycle with self-contained questions. Check your answer, then use the explanation to understand the reasoning.

1 questionAnswers explainedFree · no login

Try this question

Container lifecycle · MCQQuestion link ↗

Container web-1 exists and is running. Which command stops it gracefully?

Choose one answer
Answer & explanation

Answer: docker stop web-1

docker stop sends the configured stop signal, then forcibly terminates the container after the timeout if it has not stopped.