Docker restart policies: start containers automatically
Answer: Docker restart policies control whether containers start automatically.
How they differ from live restore
The policies apply when containers exit, or when Docker restarts.
Docker recommends restart policies, and warns against using process managers to start containers.
The live-restore flag on the dockerd command is a different mechanism.
During a Docker upgrade, that flag can keep containers running.
Policy values
The no policy is the default and does not automatically restart the container.
The on-failure policy restarts a container that exits with a non-zero exit code.
The always policy restarts the container if it stops.
The unless-stopped policy is similar to always, except a stopped container is not restarted after the daemon restarts.
See also
Claims
- id: C1 claim: Restart policies control automatic container starts. source: S1 evidence: "to control whether your containers start automatically"
- id: C2 claim: Docker recommends restart policies instead of process managers. source: S1 evidence: "avoid using process managers to start containers"
- id: C3 claim: Restart policies control automatic container starts. source: S2 evidence: "to control whether your containers start automatically"
- id: C4 claim: Restart policies differ from the live-restore flag. source: S2 evidence: "Restart policies are different from the
--live-restoreflag"
Sources
- [S1] Start containers automatically. Docker, Inc.. https://docs.docker.com/engine/containers/start-containers-automatically/ . License: Apache License 2.0. Accessed 2026-11-26.
- [S2] Start containers automatically (source). Docker, Inc.. https://raw.githubusercontent.com/docker/docs/main/content/manuals/engine/containers/start-containers-automatically.md . License: Apache License 2.0. Accessed 2026-11-26.
License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: Docker, Inc., Start containers automatically; Docker, Inc., Start containers automatically (source). Apache-2.0 (https://raw.githubusercontent.com/docker/docs/main/LICENSE). Copyright Docker, Inc. Text was condensed and changed from the originals.
License: CC-BY-4.0 · Summary by iinventedlight (AI-assisted). Sources: Docker, Inc., Start containers automatically; Docker, Inc., Start containers automatically (source). Apache-2.0 (https://raw.githubusercontent.com/docker/docs/main/LICENSE). Copyright Docker, Inc.
Cite this
iinventedlight. 2026. "Docker restart policies: start containers automatically." iinventedlight Library, iil:note:jgbjn82z, version of 2026-11-26. https://iinventedlight.com/library/notes/docker-start-containers-automatically/. License: CC-BY-4.0.
@misc{iil_note_jgbjn82z,
author = {{iinventedlight}},
title = {{Docker restart policies: start containers automatically}},
howpublished = {iinventedlight Library},
year = {2026},
date = {2026-11-26},
url = {https://iinventedlight.com/library/notes/docker-start-containers-automatically/},
note = {Permanent ID iil:note:jgbjn82z. License: CC-BY-4.0.},
}
Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com. Or Report a correction (no account needed).
Extra files beside this note
These files use this note's license, shown below. Paper extras retain their reproduction status; a link is not a reproduction.
- docker-start-containers-automatically.schema.json (schema; CC-BY-4.0)
- docker-start-containers-automatically.table.json (table; CC-BY-4.0)
For language models and agents: start at /llms.txt | /agents.md | /.well-known/agent-library.json. This page in Markdown: /library/notes/docker-start-containers-automatically.md.