Install Docker Compose
After installing Docker, you may also want to install Docker Compose. This tool allows you to manage applications that rely on multiple containers instead of just one.
Debian 12 - Install Compose Plugin
One used to have to install docker compose as a separate tool through Python PIP, but now it can be installed as a plugin for docker,
which simply requires you to switch to using docker compose
commands instead of docker-compose
. To install this way, use the following command:
sudo apt update \
&& sudo apt install docker-compose-plugin
Using PIP3 (recommended)
If you are using Debian 10, or Ubuntu 20.04, then you want to install docker-compose using the following:
sudo apt-get install python3-pip -y \
&& sudo pip3 install --upgrade pip \
&& sudo pip3 install docker-compose
Versions
- Debian 10 - docker-compose version 1.25.5, build unknown
Using PIP
This method was what I used when installing the latest version of docker-compose on Debian 8 and Ubuntu 16.04.
sudo apt-get install python-pip -y \
&& sudo pip install --upgrade pip \
&& sudo pip install docker-compose
Native Packages
On Ubuntu 18.04, you can install docker-compose by simply running:
sudo apt-get install docker-compose -y
Check Version
To test that you have successfully installed docker compose, run the following command:
docker-compose --version
First published: 16th August 2018