docker/docker — pull request #9759 by ibuildthecloud (2014-12-20 00:53:49+00:00)
Title: Proposal: Add the ability to restart a container every X seconds

Currently Docker will sleep 100 * 2^(N-1) milliseconds where N is the number of times it has done a restart. So this means each restart will sleep twice as long as the last sleep. So 100 milliseconds, then 200, 400, 800, etc. The problem is that if you have a container that is failing to start for awhile this sleep time can become hours. For many things (like a container depending on an external service) it is preferable to just always restart on a fixed interval. For example, just sleep 2 seconds each time.

The syntax for this will be

`--restart always:2s`

I know more docs need to change so I just documented the syntax I'm proposing. I'm sure there will be many opinions so as soon as there is an agreement on the syntax, then I'll update all the docs.