vitess.io/vitess@v0.16.2/doc/DockerBuild.md (about) 1 We created the `lite` image as a stripped down version of our old image `base` such that Kubernetes pods can start faster. 2 The `lite` image is updated automatically after every push to the GitHub main branch. 3 4 For more information on the different images we provide, please read the [`docker/README.md`](https://github.com/vitessio/vitess/tree/main/docker) file. 5 6 If your goal is run the latest Vitess code, the simplest solution is to use the `lite`. 7 8 Another alternative is to customize our Docker images and build them yourselves. 9 This is described below and involves building the `base` image first. 10 Then you can run our build script for the `lite` image which extracts the Vitess binaries from the built `base` image. 11 12 1. Install [Docker](https://docs.docker.com/v17.12/install/) on your workstation. 13 14 Our scripts also assume you can run the `docker` command without `sudo`, 15 which you can do by [setting up a docker group](https://docs.docker.com/engine/installation/linux/ubuntulinux/#create-a-docker-group). 16 17 1. Create an account on [Docker Hub](https://docs.docker.com/docker-hub/) and 18 then `docker login` to it. 19 20 1. Go to your `src/vitess.io/vitess` directory. 21 22 1. Usually, you won't need to [build your own bootstrap image](https://github.com/vitessio/vitess/blob/main/docker/bootstrap/README.md) 23 unless you edit [bootstrap.sh](https://github.com/vitessio/vitess/blob/main/bootstrap.sh) 24 or [vendor.json](https://github.com/vitessio/vitess/blob/main/vendor/vendor.json), 25 for example to add new dependencies. If you do need it then build the 26 bootstrap image, otherwise pull the image using one of the following 27 commands depending on the MySQL flavor you want: 28 29 ```sh 30 vitess$ docker pull vitess/bootstrap:mysql57 # MySQL Community Edition 5.7 31 vitess$ docker pull vitess/bootstrap:mysql56 # MySQL Community Edition 5.6 32 vitess$ docker pull vitess/bootstrap:percona57 # Percona Server 5.7 33 vitess$ docker pull vitess/bootstrap:percona # Percona Server 34 ``` 35 36 **Note:** If you have already downloaded the `vitess/bootstrap:<flavor>` 37 image on your machine before then it could be old, which may cause build 38 failures. So it would be a good idea to always execute this step. 39 40 1. Build the `vitess/base[:<flavor>]` image. 41 It will include the compiled the Vitess binaries. 42 (`vitess/base` also contains the source code and tests i.e. everything needed for development work.) 43 44 Choose one of the following commands (the command without suffix builds 45 the default image containing MySQL 5.7): 46 47 ```sh 48 vitess$ make docker_base 49 vitess$ make docker_base_mysql56 50 vitess$ make docker_base_percona57 51 vitess$ make docker_base_percona 52 ``` 53 54 1. Build the `vitess/lite[:<flavor>]` image. 55 This will run a script that extracts from `vitess/base` only the files 56 needed to run Vitess. 57 58 Choose one of the following commands (the command without suffix builds 59 the default image containing MySQL 5.7): 60 61 ```sh 62 vitess$ make docker_lite 63 vitess$ make docker_lite_mysql56 64 vitess$ make docker_lite_percona57 65 vitess$ make docker_lite_percona 66 ``` 67 68 1. Re-tag the image under your personal repository, then upload it. 69 70 ```sh 71 vitess$ docker tag -f vitess/lite yourname/vitess 72 vitess$ docker push yourname/vitess 73 ``` 74 75 **Note:** If you chose a non-default flavor above, then change `vitess/lite` in 76 the above command to `vitess/lite:<flavor>`. 77 78 79 1. Launch [Vitess on Kubernetes](https://vitess.io/docs/get-started/index.html) as usual.