The objective of this article is to install docker-compose on Ubuntu 20.04 Focal Fossa Linux Server/Desktop.

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
docker-compose on Ubuntu 20.04 Focal Fossa Linux
docker-compose on Ubuntu 20.04 Focal Fossa Linux

Software Requirements and Conventions Used

Software Requirements and Linux Command Line Conventions
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 a Ubuntu Repository

The recommended approach is to install the docker-compose utility for a standard Ubuntu repository. This will provide you with a stable system and easy updates.

  1. To install docker-compose requires only a single step. Execute the bellow apt command:
    $ sudo apt install docker-compose
    

  2. SUBSCRIBE TO NEWSLETTER
    Subscribe to Linux Career NEWSLETTER and receive latest Linux news, jobs, career advice and tutorials.


  3. 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
  4. Install the latest docker-compose version from the Official git repository

    Sometimes you might want to install the latest version of the docker-compose. In this case navigate to the official docker-compose git repository and follow the installation procedure. You can you 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
    


    Check the version:
    $ 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
    
ARE YOU LOOKING FOR A LINUX JOB?
Submit your RESUME, create a JOB ALERT or subscribe to RSS feed on LinuxCareers.com.
LINUX CAREER NEWSLETTER
Subscribe to NEWSLETTER and receive latest news, jobs, career advice and tutorials.
DO YOU NEED ADDITIONAL HELP?
Get extra help by visiting our LINUX FORUM or simply use comments below.