Installing docker-compose

At the time of writing this book, the latest release of docker-compose is 1.11.2, and it is recommended that you use it with the Docker release 1.9.1 or above. You can find the latest official release of docker-compose at the GitHub location (https://github.com/docker/compose/releases/latest).

We have automated the installation process of docker-compose and also made it available for public consumption at http://sjeeva.github.io/getcompose. These automated scripts precisely identify the latest version of docker-compose, download it, and install it at /usr/local/bin/docker-compose:

  • Use the wget tool like this:
      $ wget -qO- http://sjeeva.github.io/getcompose 
| sudo sh
  • Use the curl tool like this:
      $ curl -sSL http://sjeeva.github.io/getcompose 
| sudo sh

Alternatively, you may choose to install a particular version of docker-compose directly from the GitHub software repository. Here, you can find the ways and means of downloading and installing the docker-compose version 1.11.2:

Use the wget tool like this:

sudo sh -c 'wget -qO- 
https://github.com/docker/compose/releases/tag/1.11.2/
docker-compose-`uname -s`-`uname -m` >
/usr/local/bin/docker-compose;
chmod +x /usr/local/bin/docker-compose'

Use the curl tool like this:

curl -L https://github.com/docker/compose/releases/download/1.11.2/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose

The docker-compose tool is also available as a Python package, which you can install using the pip installer, as shown here:

$ sudo pip install -U docker-compose  
If pip is not installed on the system, install the pip package before the docker-compose installation.

Having successfully installed docker-compose, you can now check the docker-compose version:

$ docker-compose --version
docker-compose version 1.11.2, build dfed245
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset