In this tutorial you will learn:
- How to install docker-compose from Ubuntu repository
- How to install the latest docker-compose from the official git repository
Software Requirements and Conventions Used
Category | Requirements, Conventions or Software Version Used |
---|---|
System | Installed or upgraded Ubuntu 20.04 Focal Fossa |
Software | docker-compose |
Other | Privileged access to your Linux system as root or via the sudo command. |
Conventions | # - requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command $ - requires given linux commands to be executed as a regular non-privileged user |
Install docker-compose on Ubuntu 20.04 step by step instructions
Install docker-compose from Ubuntu Repository
The recommended approach is to install thedocker-compose
utility from a standard Ubuntu repository. This will provide you with a stable system and easy updates. - Installing
docker-compose
requires only a single step. Execute the bellowapt
command:$ sudo apt install docker-compose
- Check the
docker-compose
to confirm the installation:$ docker-compose version docker-compose version 1.21.0, build unknown docker-py version: 3.4.1 CPython version: 3.7.5 OpenSSL version: OpenSSL 1.1.1c 28 May 2019
Subscribe to RSS and NEWSLETTER and receive latest Linux news, jobs, career advice and tutorials.
Install the latest docker-compose version from the official git repository
Sometimes you might want to install the latest version ofdocker-compose
. In this case navigate to the official docker-compose git repository and follow the installation procedure. You can use the below commands while replacing the version number in the URL. Example: $ sudo wget -O /usr/local/bin/docker-compose https://github.com/docker/compose/releases/download/1.25.0/docker-compose-Linux-x86_64 $ sudo chmod +x /usr/local/bin/docker-compose
$ docker-compose version docker-compose version 1.25.0, build 0a186604 docker-py version: 4.1.0 CPython version: 3.7.4 OpenSSL version: OpenSSL 1.1.0l 10 Sep 2019