dotcloud/docker — pull request #3064 by tianon (2013-12-05 09:30:11+00:00)
Title: Allow custom dockerinit path

This PR includes a couple tweaks to our dockerinit handling, but they all laid the groundwork for allowing packagers to specify an explicit dockerinit search path when invoking dynbinary (to only be used when absolutely necessary - ie, one of the paths we provide in "utils/utils.go" is not sufficient already).

As a side effect of this, I found a bug where we could still have a dynamic docker in the container. In the current code, if we install a system-wide static docker and start it up, then remove that binary file from disk and replace it with a docker+dockerinit dynamic combo, docker will see that it was compiled with IAMSTATIC and just automatically mount that dynamic docker that's at the correct path into the container, which is _not_ correct. Overcoming this was deceptively simple - we just need to unconditionally copy our docker binary, regardless of whether we're static.

Also, as discussed with @shykes, I've added the dockerinit path and SHA1 to `docker info`, but they only display when either the client or the daemon are in debug mode (like all the other platform-ish info, like LXC Version and Kernel Version).

See also https://github.com/dotcloud/docker/pull/2924#issuecomment-29543032.

As always, I'm happy to make changes if necessary. :)