Docker Compose is a tool that allows you to run multi-container application environments based on definitions set in a YAML file. It uses service definitions to build fully customizable environments with multiple containers that can share networks and data volumes.
Make sure Docker installed on your environment if not refer to how to install latest Docker with terminal on Linux Ubuntu 20.04 Focal Fossa
To make sure we obtain the most updated stable version of Docker Compose, we’ll download this software from its official Github repository.
First, confirm the latest version available in their releases page. At the time of this writing, the most current stable version is 1.27.4
.
# Download and save the executable file $ sudo curl -L "https://github.com/docker/compose/releases/download/1.27.4/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose # Set the correct permissions for execution $ sudo chmod +x /usr/local/bin/docker-compose # Verify docker-compose installation $ docker-compose --version # OUTPUT docker-compose version 1.27.4, build 40524192
Have fun!