|
| 1 | +# Updating Docker and docker-compose |
| 2 | + |
| 3 | +Docker and docker-compose are built into the AMIs by the Packer build. |
| 4 | + |
| 5 | +See https://github.com/buildkite/elastic-ci-stack-for-aws/pull/954 for an |
| 6 | +example of updating Docker and docker-compose for Linux and Windows. |
| 7 | + |
| 8 | +1. Create a new branch |
| 9 | +1. Update and commit a change to the Packer install scripts for [Linux](#linux) and [Windows](#windows) for the new version(s) |
| 10 | +1. Push your branch and open a pull request |
| 11 | +1. Wait for CI to go green |
| 12 | +1. Merge |
| 13 | + |
| 14 | +## Linux |
| 15 | + |
| 16 | +Packer installs Docker, docker-compose, and `docker buildx` using the [`packer/linux/scripts/install-docker.sh`](packer/linux/scripts/install-docker.sh) |
| 17 | +script. Update the `DOCKER_VERSION` variable in this file to change which |
| 18 | +version of Docker is installed. Update the `DOCKER_COMPOSE_VERSION` variable to |
| 19 | +change which version of docker-compose is installed. Update the |
| 20 | +`DOCKER_BUILDX_VERSION` variable to change which version of `docker buildx` is installed. |
| 21 | + |
| 22 | +Binary releases are downloaded directly from Docker and GitHub. |
| 23 | + |
| 24 | +## Windows |
| 25 | + |
| 26 | +Packer installs Docker, and `docker-compose` using the [`packer/windows/scripts/install-docker.ps1`](packer/windows/scripts/install-docker.ps1) |
| 27 | +script. |
| 28 | + |
| 29 | +[MicrosoftDockerProvider](https://github.com/OneGet/MicrosoftDockerProvider) |
| 30 | +is used to source Docker packages. The list of available packages that it |
| 31 | +installs can be found at https://dockermsft.azureedge.net/dockercontainer/DockerMsftIndex.json. |
| 32 | + |
| 33 | +Update the `docker_version` variable in `install-docker.ps1` to one of the |
| 34 | +available package versions to change which version of Docker is installed. |
| 35 | + |
| 36 | +The `choco` package manager is used to install `docker-compose`. See the |
| 37 | +[chocolatey package manager version history](https://community.chocolatey.org/packages/docker-compose#versionhistory) |
| 38 | +for a list of available versions. |
| 39 | + |
| 40 | +Update the `docker_compose_version` variable in `install-docker.ps1` to change |
| 41 | +which version of `docker-compose` is installed. |
0 commit comments