How to install Docker Compose in Ubuntu 20.04

What is Docker Compose?

Docker Compose is a tool that lets you define and execute multi-container Docker applications. With Docker Compose you will use YAML files to configure application’s services and, once they are defined, with only one command we can create and execute all the services as described in configuration.

Previous Requisites

In order to carry out the actions described in this article we will need to have:

Installing Docker Compose

We will use the Docker Composer’s official repository to ensure we install the latest version.

Important: Before installing, we should check what is the latest version available in Docker Composer’s releases web and we should modify VERSION variable value in the next commands:

VERSION=1.27.0 sudo curl -L "$VERSION/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose

At last we will check that Docker Compose was installed correctly and that it is working in our system:

docker-compose --version

Entradas relacionadas