To install the latest version of Docker Compose from github, use the following command and replace v2.17.2 with the current version.
sudo curl -L https://github.com/docker/compose/releases/download/v2.17.2/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
If the command doesn't work, run
uname -sanduname -mdirectly and put its output in the initial command.
Next, you have to set the correct permissions:
sudo chmod +x /usr/local/bin/docker-compose
Now to check which version of docker compose is installed on your system, use the following command:
docker-compose --version