Note
Docker Compose comes inbult with Docker Desktop, this tutorial is only applicable for those who installed it manually.
How to Install Docker Compose?
Docker Compose is available on multiple platforms.In this lab we’ll demonstrate some of the ways to install it on Linux, Windows and Mac.
Installing Docker Compose on Linux
Installing Docker Compose on Linux is a two-step process. Firt you will be downloading binary from github, Second giving executable permission.
Download the current stable release of Docker Compose
$ curl -L https://github.com/docker/compose/releases/download/1.24.1/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
$ chmod +x /usr/local/bin/docker-compose
Test the installation
You can run this command from a terminal window
$ docker-compose --version
Installing Docker Compose on Windows 10
If you have already installed Docker Desktop for Windows or Docker Toolbox then no need of separate installation for docker compose, since its part of the package.
Check Docker Compose is installed
You can run this command from a PowerShell or CMD terminal.
docker-compose --version
Installing Docker Compose on Mac
Docker Compose is installed as part of Docker for Mac. So if you have Docker for MAC, you have Docker Compose.
Check Docker Compose is installed
You can run this command from a terminal window.
$ docker-compose --version