docker/docker — pull request #8339 by cpuguy83 (2014-10-01 14:12:38+00:00)
Title: Add daemon opt to set default restart policies

Sets a daemon flag `--default-restart-policy`.
Current implementation does not actually set the policy on a container.

Checks on container.Start if the restart policy on the container is not set, uses the default policy for the monitor if so.
On daemon restart checks if the restart policy on the container is not set, uses the default policy if not to determine if the container should be restarted.

Alternative implementation would be to actually set the container's policy if none was specified.

Current implementation allows flexibility to change the policy (on daemon restart) and be able to effect already created containers.