What you need to know
A configured restart policy can intentionally stand aside after an operator stops the container.
Potentially affected
Review Docker container restart policy after application exit, operator stop and daemon restart.
DSE recommendation
DSE recommends recording deliberate stops in maintenance activity and checking the effective policy before assuming failed automatic recovery.
A configured restart policy can intentionally stand aside after an operator stops the container.
Source facts
Docker ignores a container’s restart policy after a manual stop until the daemon or container is restarted. The always and unless-stopped policies differ across daemon restart: unless-stopped preserves the stopped state. Docker also applies restart policy only after the container has started successfully under its documented monitoring threshold, avoiding an immediate launch-failure loop.
Source: Docker documentation — Start containers automatically.
Applicability
Review Docker container restart policy after application exit, operator stop and daemon restart.
DSE recommendation
DSE recommends recording deliberate stops in maintenance activity and checking the effective policy before assuming failed automatic recovery. Choose whether a stopped workload should return after host maintenance and document that decision with its owner. Avoid combining competing host supervisors and container restart mechanisms without a clear authority. Keep application health checks separate from process-exit handling; a running but unhealthy process may require another response. Review start failures as deployment defects rather than attempting to conceal them with increasingly aggressive restarts.
Verification
In a test workload, compare an application exit with a manual stop, then inspect the result of a controlled daemon restart under the chosen policy. Confirm monitoring recognizes an intentionally stopped service and alerts appropriately when it remains unavailable beyond the approved window. Preserve the operator stop event and the selected policy with the observed lifecycle. Have the service owner identify the permitted maintenance-stop duration and the exact action expected to return the workload to service.
Official reference
Docker documentation — Start containers automatically. Reviewed October 20, 2026.
Review the official source
Docker documentation — Start containers automatically · Verified October 20, 2026
Need help applying this guidance safely?
DSE can help confirm applicability, protect service continuity, and validate the result across physical security and IT systems.
Talk with DSE