Sudo: Docker-Compose: Command Not Found

Docker compose: command not found - Despite configuring the path and making file as executable

Try sudo docker-compose instead. The ./ means that the shell you're in will look in the current directory. If you aren't inside /usr/local/bin or /usr/bin, it will fail.

Also if you're on linux, you should follow the following instructions to avoid having to run docker as root: https://docs.docker.com/install/linux/linux-postinstall/

Why is Docker installed but not Docker Compose?

You also need to install Docker Compose. See the manual. Here are the commands you need to execute

sudo curl -L "https://github.com/docker/compose/releases/download/v2.12.2/docker-compose-$(uname -s)-$(uname -m)"  -o /usr/local/bin/docker-compose
sudo mv /usr/local/bin/docker-compose /usr/bin/docker-compose
sudo chmod +x /usr/bin/docker-compose

Note:
Make sure that the link pointing to the GitHub release is not outdated!. Check out the latest releases on GitHub.

Docker-Compose error: line 1: Not: command not found when executing --version (Current Version 1.27.4)

I found a different "How to"
DOCKER ON UBUNTU RASPBERRY PI 4
From what I can remember, seems a lot like other "How to".
There was this one comment.

Docker does not have a release for Docker-Compose for arm64 yet; however, I have a shell script which will allow us to download a compatible Docker-Compose container with arm64 from my GitHub.

He had one for 1.28 and one for "the latest" I used the latest

sudo curl -L --fail https://github.com/AppTower/docker-compose/releases/download/latest/run.sh -o /usr/local/bin/docker-compose

Then when I tried the docker-compose --version I got this:

ubuntu@ubuntu:~$ docker-compose --version
Unable to find image 'apptower/docker-compose:latest' locally
latest: Pulling from apptower/docker-compose
d2f70382dc9a: Pull complete
3edfa0ca360e: Pull complete
e8fa2c4aadc9: Pull complete
724e91a62418: Pull complete
Digest: sha256:3c6c36c09554b7be4faeb102758f76cb149d703865290a719f6a541ce78851d8
Status: Downloaded newer image for apptower/docker-compose:latest
docker-compose version 1.29.2, build 5becea4c
ubuntu@ubuntu:~$

Bottom line, I wish I could document for others in the same boat, but I am not sure exactly what it was that fixed it. Just that I was able to see the version. Now back to the project that I need docker for. :-)

Docker-compose logs command can't show symbol characters, but docker logs command can?

Fixed this issue by updating the docker-compose version from v1.29.2 to v2.2.3.

But strangely, on the docker-compose official installation page, they are using the v1.29.2 version to install. I don't know why, but may be backward compatibility issues...
https://docs.docker.com/compose/install

Although I found docker-compose new releases from the official Github repo:
https://github.com/docker/compose/releases

And I installed a new version from their GitHub repo releases.

docker-compose command not available for mac

I ran into the same issue on macOS today. Turned out that you need to run the installed app once, it does some additional downloading and setup. That setup includes setting up your path variables.



Related Topics



Leave a reply



Submit