Intermediate Docker & Containers
Q66 / 100

What does "restart: unless-stopped" mean in a docker-compose service definition?

Correct! Well done.

Incorrect.

The correct answer is B) The container automatically restarts if it stops/crashes or on daemon restart, unless it was explicitly stopped by the user

B

Correct Answer

The container automatically restarts if it stops/crashes or on daemon restart, unless it was explicitly stopped by the user

Explanation

"unless-stopped" restarts the container on failure or Docker daemon restart, but respects an explicit "docker stop" — the container will not be automatically restarted after that until manually started again.

Progress
66/100