see docker compose version code example
Example 1: docker compose install ubuntu
sudo curl -L "https://github.com/docker/compose/releases/download/1.28.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
Example 2: docker compose install ubuntu
sudo chmod +x /usr/local/bin/docker-compose