Install Docker Compose
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