docker-compose: command not found Docker Origin: Platform & cloud OSI layer 7 · Application Last updated 13 Oct 2026

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.

Exact message you may see docker-compose: command not found'compose' is not a docker commandunknown shorthand flag: 'f' in -fdocker: 'compose' is not a docker command
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:

Where this error sits

Origin: Platform & cloud. Errors that are often confused with or caused by this one (click to open):

adb server version doesn't match — adb server version (41) doesn't match this client (39); killing... (Android)adb server version do…AWS_CA_BUNDLE — AWS CLI/SDK: SSL validation failed for https://... certificate verify failed (custom CA bundle / proxy) (SSL / TLS)AWS_CA_BUNDLEaws: error: argument — aws: error: argument command: Invalid choice / Unknown options (AWS)aws: error: argumentcommand not found — bash: command not found (Linux)command not foundcompose validation — docker compose: services.x Additional property y is not allowed / yaml: line N: mapping values are not allowed (Docker)compose validationDefault FirebaseApp is not initialized — IllegalStateException: Default FirebaseApp is not initialized in this process (Android)Default FirebaseApp i…depends on undefined service — service "web" depends on undefined service "db": invalid compose project (Docker)depends on undefined …ENOENT — npm ERR! enoent ENOENT: no such file or directory, open '/path/package.json' (npm)ENOENTdocker-co…

Explore the map of this error Full error map →

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