docker-compose: command not found / 'compose' is not a docker command
Your system has only one of the two Compose flavours: the old docker-compose (v1) binary or the newer docker compose (v2) plugin.
docker-compose: command not found'compose' is not a docker commandunknown shorthand flag: 'f' in -fdocker: 'compose' is not a docker command Meaning
Compose v1 (docker-compose, Python) is deprecated; Compose v2 is a Docker CLI plugin used as docker compose (space). Newer installs lack docker-compose; older ones lack the plugin.
Common causes
- Only Compose v2 installed, scripts call docker-compose
- Only v1 installed, docs use docker compose
- Plugin missing after installing docker-ce without docker-compose-plugin
⚡ Quick fix
- Use docker compose (space)
- Install the plugin: apt install docker-compose-plugin
- Add an alias for old scripts
Detailed fix by platform
Linux
- bash
sudo apt-get install docker-compose-plugin docker compose version
Shell
alias docker-compose='docker compose'
How to diagnose
- Versions — docker compose version; docker-compose --version
- Scripts — Which form do CI scripts use?
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
- adb server version doesn't match adb server version (41) doesn't match this client (39); killing...
- AWS_CA_BUNDLE AWS CLI/SDK: SSL validation failed for https://... certificate verify failed (custom CA bundle / proxy)
- aws: error: argument aws: error: argument command: Invalid choice / Unknown options
Most viewed in Docker
- docker-credential-desktop error getting credentials - err: exec: "docker-credential-desktop": executable file not found in $PATH
- pull access denied pull access denied for image, repository does not exist or may require 'docker login'
- lookup registry-1.docker.io: no such host dial tcp: lookup registry-1.docker.io: no such host / Temporary failure in name resolution during docker build
Other ways to find it
Where this error sits
Origin: Platform & cloud. Errors that are often confused with or caused by this one (click to open):
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
💬 What worked for others
No tips yet — did something else fix this for you?
Share what worked for you
Tips are checked by an editor before they appear. Links are removed.
Report a correction or suggest an improvement
Last updated 13 Oct 2026