dotcloud/docker — pull request #2298 by unclejack (2013-10-18 23:17:54+00:00)
Title: 2070 validate source for bind mounts

This PR fixes issue #2070.

It makes the following changes:
* It adds client side validation of the bind mount to reject bind mounts which attempt to bind mount the root of the host to the container. This means it will reject bind mounts such as "/:/any/container/path" right away without attempting to connect to the server.
* It adds server side validation of the bind mounts to reject bind mounts which attempt to bind mount the root of the host to the container. The server will reject bind mounts such as "/:/any/container/path".
* It adds server side checking to ensure that the path exists on the host before attempting to bind mount it in the container. ContainerStart will error out and notify the client of the exact error.

Two tests have been added to ensure that these errors are getting thrown when appropriate.