We previously saw how to install Docker on Debian 11. As a sequel, I’m going to round it off with the
docker compose installation on Debian 11.
- Debian 11
- sudo privileges
Install latest Compose on Debian 11
Step 1. First, download the latest compose version and add the executable path.
sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
If you want to specify another composer version you just need to change the
1.29.2 part from the link above.
Step 2. Execute the following command to set the right binary permissions:
sudo chmod +x /usr/local/bin/docker-compose
NOTE. This step is only needed, if for some reason the path
/usr/local/bin/docker-compose causes any issues you can always create a symbolic link to
sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
Step 3. To test the installation, run:
docker-compose version 1.29.2, build 5becea4c
Uninstall Docker Compose on Debian 11
If you decide to uninstall compose on Debian 11, whatever the reason is, just run:
sudo rm /usr/local/bin/docker-compose
Deploying your containers through Docker Compose will simplify and provide better manageability instead of using Docker commands. This tutorial will help you to achieve that by installing Docker Compose on Debian 11. Feel free to leave a comment below and if you find this tutorial useful, follow our official channel on Telegram.