|
| 1 | +# Vitess Docker Images |
| 2 | + |
| 3 | +The Vitess Project publishes several Docker images in the [Docker Hub "vitess" repository](https://hub.docker.com/u/vitess/). |
| 4 | +This file describes the purpose of the different images. |
| 5 | + |
| 6 | +**TL;DR:** Use the [vitess/lite](https://hub.docker.com/r/vitess/lite/) image for running Vitess. |
| 7 | +Our Kubernetes Tutorial uses it as well. |
| 8 | +Instead of using the `latest` tag, you can pin it to a known stable version e.g. `v2.0`. |
| 9 | + |
| 10 | +## Principles |
| 11 | + |
| 12 | +The structure of this directory and our Dockerfile files is guided by the following principles: |
| 13 | + |
| 14 | +* The configuration of each Vitess image is in the directory `docker/<image>/`. |
| 15 | +* Configurations for other images e.g. our internal tool Keytar (see below), can be in a different location. |
| 16 | +* Images with more complex build steps have a `build.sh` script e.g. see [lite/build.sh](https://github.com/youtube/vitess/blob/master/docker/lite/build.sh). |
| 17 | +* Tags are used to provide (stable) versions e.g. see tag `v2.0` for the image [vitess/lite](https://hub.docker.com/r/vitess/lite/tags). |
| 18 | +* Where applicable, we provide a `latest` tag to reference the latest build of an image. |
| 19 | + |
| 20 | +## Images |
| 21 | + |
| 22 | +Our list of images can be grouped into: |
| 23 | + |
| 24 | +* published Vitess code |
| 25 | +* dependencies for our Kubernetes tutorial |
| 26 | +* internally used tools |
| 27 | + |
| 28 | +### Vitess |
| 29 | + |
| 30 | +| Image | How (When) Updated | Description | |
| 31 | +| --- | --- | --- | |
| 32 | +| **bootstrap** | manual (after incompatible changes are made to [bootstrap.sh](https://github.com/youtube/vitess/blob/master/bootstrap.sh) or [vendor/vendor.json](https://github.com/youtube/vitess/blob/master/vendor/vendor.json) | Basis for all Vitess images. It is a snapshot of the checked out repository after running `./bootstrap.sh`. Used to cache dependencies. Avoids lengthy recompilation of dependencies if they did not change. Our internal test runner [`test.go`](https://github.com/youtube/vitess/blob/master/test.go) uses it to test the code against different MySQL versions. | |
| 33 | +| **base** | automatic (after every GitHub push to the master branch) | Contains all Vitess server binaries. Snapshot after running `make build`. | |
| 34 | +| **root** | automatic (after every GitHub push to the master branch) | Same as **base** but with the default user set to "root". Required for Kubernetes. | |
| 35 | +| **lite** | manual (updated with every Vitess release) | Stripped down version of **base** e.g. source code and build dependencies are removed. Default image in our Kubernetes templates for minimized startup time. | |
| 36 | + |
| 37 | +All these Vitess images include a specific MySQL/MariaDB version ("flavor"). |
| 38 | + |
| 39 | + * We provide Dockerfile files for multiple flavors (`Dockerfile.<flavor>`). |
| 40 | + * As of April 2017, the following flavors are supported: `mariadb`, `mysql56`, `mysql57`, `percona`(56), `percona57` |
| 41 | + * On Docker Hub we publish only images with MySQL 5.7 to minimize maintenance overhead and avoid confusion. |
| 42 | + * If you need an image for a different flavor, it is very easy to build it yourself. See the [Custom Docker Build instructions](http://vitess.io/getting-started/docker-build.html). |
| 43 | + |
| 44 | +If you are looking for a stable version of Vitess, use the **lite** image with a fixed version. If you are looking for the latest Vitess code in binary form, use the "latest" tag of the **base** image. |
| 45 | + |
| 46 | +### Kubernetes Tutorial Dependencies |
| 47 | + |
| 48 | +| Image | How (When) Updated | Description | |
| 49 | +| --- | --- | --- | |
| 50 | +| **etcd-lite** | manual | Our Kubernetes tutorial uses etcd as Vitess topology backing store and runs this image. It is a stripped version of the **etcd** image for faster Kubernetes startup times. Published as `vitess/etcd:<version>-lite` e.g. [v2.0.13-lite](https://hub.docker.com/r/vitess/etcd/tags/). | |
| 51 | +| **etcd** | manual | Basis for **etcd-lite**. | |
| 52 | +| **guestbook** | manual (updated with every Vitess release) | Vitess adaption of the Kubernetes guestbook example. Used to showcase sharding in Vitess. Dockerfile is located in [`examples/kubernetes/guestbook/`](https://github.com/youtube/vitess/tree/master/examples/kubernetes/guestbook). | |
| 53 | +| **orchestrator** | manual | Binaries for [Orchestrator](https://github.com/github/orchestrator). It can be used with Vitess for automatic failovers. Currently not part of the Kubernetes Tutorial and only used in tests. | |
| 54 | + |
| 55 | +### Internal Tools |
| 56 | + |
| 57 | +These images are used by the Vitess project for internal workflows and testing infrastructure and can be ignored by users. |
| 58 | + |
| 59 | +| Image | How (When) Updated | Description | |
| 60 | +| --- | --- | --- | |
| 61 | +| **publish-site** | manual | Contains [Jekyll](https://jekyllrb.com/) which we use to generate our [vitess.io](http://vitess.io) website from the Markdown files located in [doc/](https://github.com/youtube/vitess/tree/master/doc). | |
| 62 | +| **keytar** | manual | Keytar is a Vitess testing framework to run our Kubernetes cluster tests. Dockerfile is located in [`test/cluster/keytar/`](https://github.com/youtube/vitess/tree/master/test/cluster/keytar). | |
0 commit comments