$ ./guess_the_languageDevOps
DevOps · easy · #209

What does the restart policy do here?

docker run -d --restart unless-stopped nginx
  1. Never restarts the container after it exits
  2. Restarts it only when the exit code is nonzero
  3. Restarts it once and then gives up for good
  4. 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 ▸