> ## Content Index
> Fetch the complete content index at: https://linuxhandbook.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# How to Install Docker Compose on Ubuntu
- URL: https://linuxhandbook.com/docker-compose-ubuntu/
- Published: 2020-10-16T11:00:32.000Z
- Updated: 2024-09-30T09:51:41.000Z
- Description: Here are two ways to install Docker Compose on Ubuntu.
- Author: Abhishek Prakash
- Tags: Docker Tutorials

[Docker Compose](https://docs.docker.com/compose/?ref=linuxhandbook.com) is a Python program that lets you easily deploy multiple containers on a server.

As you start exploring Docker, you'll learn that often to run a certain web-app, you'll need to run various services (like database, web-server etc) in different containers.

Deploying multiple containers is a lot easier if you [use Docker Compose](https://linuxhandbook.com/docker-compose-quick-start/).

In this tutorial, you'll learn two ways of installing Docker Compose on Ubuntu:

- Installing Docker Compose from Ubuntu's repository: Easier method but may not have the latest version of docker compose
- Installing the latest Docker Compose using PIP: Gets you the newer docker compose version

Keep in mind that to use Docker Compose, you must have Docker installed on Ubuntu.

## Install Docker Compose from Ubuntu's repository

This is the easiest and recommend method. Unless you need the latest Docker Compose version for some specific reasons, you can manage very well with the docker compose version provides by Ubuntu.

Docker Compose is available in the universe repository of Ubuntu 20.04 and 18.04 so make sure to enable it first:

```
sudo add-apt-repository universe
```

You probably won't need it but no harm in updating the local cache:

```
sudo apt update
```

Now you can install Docker Compose in Ubuntu using this command:

```
sudo apt install docker-compose
```

![Installing Docker Compose on Ubuntu](https://linuxhandbook.com/content/images/2020/10/install-docker-compose-ubuntu.png)

You can check that Docker Compose is installed successfully by checking its version:

```
docker-compose --version
```

It should show an output like this:

```
abhishek@handbook:~$ docker-compose --version
docker-compose version 1.25.0, build unknown

```

## Install the latest Docker Compose on Ubuntu using PIP

PIP stands for 'PIP Installs Package'. It's a command-line based package manager for installing Python applications.

Since [Docker Compose is basically a Python program](https://pypi.org/project/docker-compose/?ref=linuxhandbook.com), you can use PIP to install it.

But before you do that, you need to [install PIP on Ubuntu](https://itsfoss.com/install-pip-ubuntu/?ref=linuxhandbook.com) first.

Enable the universe repository first.

```
sudo add-apt-repository universe
```

Install PIP now:

```
sudo apt install python3-pip
```

Now that you have PIP installed use it to install Docker Compose for all users on your Linux system:

```
sudo pip3 install docker-compose
```

![Installing Docker Compose on Ubuntu with PIP](https://linuxhandbook.com/content/images/2020/10/install-docker-compose-with-pip-on-ubuntu.png)

Check the Docker Compose version to ensure that it is installed successfully:

```
abhishek@handbook:~$ docker-compose --version
docker-compose version 1.27.4, build unknown
```

You can see that Docker Compose installed via PIP is more recent version.

I hope you were able to successfully install Docker Compose on Ubuntu with this tutorial. I highly recommend reading this quick starter guide to Docker Compose.

[A Quick Guide to Using Docker ComposeDocker Compose is a Docker-native tool that makes multi-container application management a breeze.![](https://linuxhandbook.com/assets/icon-192x192.png?v=35ef19e707)Linux HandbookHunter Wittenborn![](https://linuxhandbook.com/content/images/2021/06/Docker-Compose-quick-start-guide.png)](https://linuxhandbook.com/docker-compose-quick-start/)

And then learn the [basic Docker compose commands](https://linuxhandbook.com/docker-compose-essential/).

[Essential Docker Compose Commands and Their UsageHere’s an overview of the Docker Compose file components and various commands you can use to manage them.![](https://linuxhandbook.com/content/images/size/w256h256/2021/08/Linux-Handbook-New-Logo.png)Linux HandbookUmair Khurshid![](https://linuxhandbook.com/content/images/2024/09/docker-compose-essentials.png)](https://linuxhandbook.com/docker-compose-essential/)

Questions and suggestions are welcome.