dotcloud/docker — pull request #2782 by alexlarsson (2013-11-20 10:02:33+00:00)
Title: Handle dockerinit upgrades while running

We rely on dockerinit being the one that matches the main docker
binary, which we verify using a sha1 hash. However, this means that
a docker upgrade while running causes the running daemon to start
failing as the dockerinit was replaced.

We solve this by finding the right dockerinit at daemon startup and
doing a bind mount of it to /var/lib/docker/.dockerinit, which we
then use as the dockerinit for the containers. This will point to the
original file even if that file is removed or replaced.