I've moved the "base" image Dockerfiles from the root to "/docker/base/" in https://github.com/youtube/vitess/pull/2769. This broke the automated build on Docker Hub because now it assumes "/docker/base" as build context and not "/" anymore. But "/" as build context is required to run "make build" and access the source code.
Therefore, I'm re-adding "Dockerfile" as symlink pointing to "docker/base/Dockerfile".
I'm also deleting "docker/base/README.md" again because I only added it for the automated build (it must be in the same directory as the "Dockerfile"). With the switch back to "/" as build context, it will use "/README.md" instead.
This unifies the locations of most of our Docker configurations and reduces complexity.
In the past, we probably had to put the Dockerfile for the "base" image in the root for the automated build feature of Docker Hub. But now they support custom paths for the Dockerfile and we should no longer have to do this.
Since the automated build looks for a README.md in the same file as the Dockerfile I created a new one in docker/base/. For the most part it is copied from the root directory, but I removed the badges at the top and the reference to Gitter.
Additionally, I've created docker/README.md which lists our different Docker images and describes how they are used in detail.
This is needed so we don't clobber the new vendor directory.
We used to need to clear the tree from bootstrap, because otherwise
files that had been deleted since the last bootstrap image was built
would remain. However, we now only copy a minimal set of files into the
bootstrap image (just enough to run bootstrap.sh), so this is no longer
a concern for ordinary source files.
This makes it faster to use Docker images to test new changes, as
suggested in #492.
Since we don't need to re-bootstrap for every push to master, this also
makes our automated builds faster and more reliable (they often fail due
to network lag when installing dependencies with apt-get).
Lastly, this will make it easier to swap out bootstrap images built for
different flavors, such as MariaDB 10.0 vs MySQL 5.6.
for building. Also properly parsing the command line flag
in bootstrap.sh.
Should reduce te nuber of times we build proto from 4x to 1x, and
grpc from 2x to 1x. Doh.