Docker and CI/CD · Junior · Question 37 of 75
What does --restart unless-stopped do?
- 1Restarts the container every hour until somebody stops it by hand
- ✓Correct answer: Restarts the container after crashes and reboots, unless you stopped it
- 3Prevents the container from being stopped by
docker stop
Explanation
Restart policies (no, on-failure, always, unless-stopped) let Docker bring services back on a single host. Orchestrators handle this in clusters.