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
Exclude List of Files from Find
How to Check the Version of Openmp on Linux
How to Continue One Thread at a Time When Debugging a Multithreaded Program in Gdb
How to Simulate a Failed Disk During Testing
How to Find All the Files That Were Created Today in Unix/Linux
How to Send List of File in a Folder to a Txt File in Linux
Detecting Keyboard, Mouse Activity in Linux
How to Use Variables in a Bash for Loop
Postgresql -Bash: Psql: Command Not Found
Do (Statically Linked) Dlls Use a Different Heap Than the Main Program
How Are Sbrk/Brk Implemented in Linux
Differencebetween Clock_Monotonic & Clock_Monotonic_Raw
Shell Script to Get the Process Id on Linux
What's the Accepted Method for Deploying a Linux Application That Relies on Shared Libraries