What does the restart policy do here?
docker run -d --restart unless-stopped nginx
- Never restarts the container after it exits
- Restarts it only when the exit code is nonzero
- Restarts it once and then gives up for good
- Restarts it unless you stopped it by hand
unless-stopped restarts the container after crashes and daemon restarts, but respects a manual docker stop.
Play DevOps ▸