The attached patch simplifies the Docker container build so that it can be done entirely using "docker build" in the root of a source tree. It also enables building the container from a tarball, not just a git checkout. This does mean that container builds may now also include any garbage in the source tree from which they're built, but conversely offers the benefit of making it easy to build a container with code changes in it without having to commit first.
Akshay, can you look it over to make sure I haven't done anything obviously stupid? Feedback from others is also welcome of course.