Installation

Simple article to get the latest Docker Compose on Debian 11

curl -s https://api.github.com/repos/docker/compose/releases/latest | grep browser_download_url | grep -i "docker-compose-$(uname -s)-$(uname -m)\"$" | cut -d '"' -f 4 | wget -O "docker-compose-$(uname -s)-$(uname -m)" -qi -

Note: If you want the breakdown of this command I will have it on the next page.

Now make executable and move to appropriate bin dir

chmod +x docker-compose-$(uname -s)-$(uname -m)
sudo mv docker-compose-$(uname -s)-$(uname -m) /usr/local/bin/docker-compose
sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose

Testing

whereis test

tests to see if docker-compose is installed where it is expected to be installed

whereis docker-compose

returns...

docker-compose: /usr/bin/docker-compose /usr/local/bin/docker-compose

LN test

test to see if ln worked as expected from installation

ls -lha /usr/bin/docker-compose

returns...

lrwxrwxrwx 1 root root 29 Oct 15 20:02 /usr/bin/docker-compose -> /usr/local/bin/docker-compose

Version Test

test docker-compose version as normal debian user. Note: adjust for your user

su debian
docker-compose --version

returns...

Docker Compose version v2.11.2

SUDO (root) Version Test

sudo docker-compose --version

returns...

Docker Compose version v2.11.2

Removal

To Remove simply run this command

sudo rm /usr/bin/docker-compose
sudo rm /usr/local/bin/docker-compose

Troubleshooting

See Next Page especially steps 3 and 4 on that page.

Leave a Reply

Your email address will not be published. Required fields are marked *