docker-compose: command not found 🐳 Docker

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

  1. Use docker compose (space)
  2. Install the plugin: apt install docker-compose-plugin
  3. Add an alias for old scripts

Detailed fix by platform

Linux

  1. bash
    sudo apt-get install docker-compose-plugin
    docker compose version

Shell

  1. alias docker-compose='docker compose'

How to diagnose

  1. Versions — docker compose version; docker-compose --version
  2. 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:

🧠 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.