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.
Seen on:
Docker
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
Most viewed in Docker
Other ways to find it
🧠 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.
Was this page helpful?
Report a correction or suggest an improvement
Last updated 7 Oct 2026