Tried to install docker-compose on CentOS using curl
per docker docs (for Linux). After those steps it returned an error
docker-compose -v
/usr/local/bin/docker-compose: line 1: Not: command not found
Funny thing docker-compose
file literally contains just "Not Found" on line 1 (it should be a binary)
cat /usr/local/bin/docker-compose
Not Found
That means a github link I tried to curl from does not exist. My unsuccessful link was:
sudo curl -L "https://github.com/docker/compose/releases/download/2.2.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
Running uname -s
and uname -m
locally you can see what needs to be added to a download url
uname -s
Linux
uname -m
x86_64
Trying the url in a browser
https://github.com/docker/compose/releases/download/2.2.2/docker-compose-linux-x86_64
shows that page was not found.
A problem they added "v" to a version, as in v2.2.2
. So a download url should be with "v"
https://github.com/docker/compose/releases/download/v2.2.2/docker-compose-linux-x86_64
. Their releases: https://github.com/docker/compose/releases/
This worked (attention v2.2.2)
sudo curl -L "https://github.com/docker/compose/releases/download/v2.2.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
docker-compose -v
Docker Compose version v2.2.2
user
in question is a developer, they should probably not be annoyed by typing a few commands since they would generally type hundreds of those things in a normal day.