Docker Compose Not Found on Ubuntu 20.04 / 22.04 / 24.04
This error matches known, documented patterns with reliable solutions.
Quick Fix (Most Common Solution)
- Check which version is installed: run docker compose version (no hyphen) — if it works, V2 is already installed
- If not found, install the V2 plugin: sudo apt-get update && sudo apt-get install docker-compose-plugin
Seeing "'compose' is not a docker command"? This error can be frustrating, but it's usually fixable. It typically affects your development workflow or system. Below you'll find clear, step-by-step solutions to resolve this issue.
What This Error Means
Ubuntu separates Docker Compose V2 (docker-compose-plugin) from the legacy V1 binary (docker-compose). When Docker is installed via apt without the plugin, the 'docker compose' subcommand is missing from the Docker CLI.
Frequently documented in developer and vendor support forums.
Not affiliated with browser, OS, or device manufacturers.
New here? Learn why exact error messages matter →
Common Causes
- Ubuntu package repositories separate docker-compose (legacy V1) from docker-compose-plugin (V2)
- Docker Desktop on Ubuntu includes Compose V2 but the CLI standalone does not
- Package manager installed an outdated version with a different binary path
How to Fix
- Check which version is installed: run docker compose version (no hyphen) — if it works, V2 is already installed
- If not found, install the V2 plugin: sudo apt-get update && sudo apt-get install docker-compose-plugin
- Verify the install: docker compose version should return Docker Compose version v2.x.x
- If you need V1 with a hyphen (legacy scripts): sudo apt install docker-compose
Last reviewed: June 2026 How we review solutions
Didn't fix it? Get a personalised solution
Environment-Specific Commands
Ubuntu 20.04 / 22.04 / 24.04 — Install V2 Plugin
sudo apt-get updatesudo apt-get install docker-compose-plugindocker compose version
Ubuntu — Install Legacy V1 Binary (if needed)
sudo apt install docker-composedocker-compose --version
Quick Diagnostic Path
- If docker compose version returns 'command not found' → Install V2 plugin: sudo apt-get install docker-compose-plugin
- If docker-compose --version returns 'command not found' → Install V1: sudo apt install docker-compose
- If Command found but version is very old (1.x) → Install V2 plugin alongside V1: sudo apt-get install docker-compose-plugin
If This Still Fails, Check
- If you installed Docker via snap (snap install docker), the compose plugin may not be available — reinstall using the official Docker apt repository instead
- On Ubuntu 18.04, docker-compose-plugin may not be in the repos — use pip3 install docker-compose or upgrade Ubuntu
- ARM64 (Raspberry Pi, Parallels): verify architecture with dpkg --print-architecture before installing
Verify Compose is installed correctly
# V2 plugin (recommended)
docker compose version
# Expected: Docker Compose version v2.x.x
# V1 legacy binary
docker-compose --version
# Expected: docker-compose version 1.x.xVersion Notes
Docker Engine Versions and Compose Not Found Ubuntu Behavioral Differences
Compose Not Found Ubuntu because core behaviors around networking, storage drivers, and BuildKit availability changed across major releases. Code that works on Docker 20.x may fail on Docker 24.x or vice versa.
Check your Docker version with docker version — the output includes both client and server (daemon) versions, which may differ in remote environments. Docker Compose V2 (bundled as docker compose) replaced the standalone V1 (docker-compose) in 2023 and has subtle behavioral differences: the depends_on condition field, variable expansion in environment values, and profile behavior all changed. If your Compose file uses features from V2 but the environment has V1, commands may silently behave differently and produce Compose Not Found Ubuntu. Pin the Docker Compose version in CI with docker compose version checks. For production deployments, test Docker Engine upgrades in staging first — storage driver migrations (overlay2, devicemapper) are not always automatic and can cause data access errors resembling Compose Not Found Ubuntu.Optional follow-up
Some users ask whether saving fixes for recurring errors would be useful when the same issue appears again.
Was this explanation helpful?
Frequently Asked Questions
What is the difference between 'docker compose' and 'docker-compose'?
docker compose (no hyphen) is the V2 plugin integrated into the Docker CLI. docker-compose (with hyphen) is the legacy V1 Python binary. V2 is the current standard and is installed via docker-compose-plugin.
Which Ubuntu versions are affected?
All Ubuntu versions (20.04, 22.04, 24.04) when Docker is installed via apt without the compose plugin. Docker Desktop installs include V2 automatically.
Can I have both V1 and V2 installed?
Yes. V2 runs as 'docker compose' and V1 as 'docker-compose'. Both can coexist, but V2 is recommended for all new projects.
Related Resources
Also Known As
- Docker container error
- Docker build failure
- Container runtime error
- Docker daemon error
Common Search Variations
- "docker container won't start"
- "docker build error fix"
- "docker image not found"
- "container exited with error"
- "docker daemon not responding"
- "fix docker network error"
Related Errors
Still Stuck?
Paste a different error message or upload a screenshot to get help instantly.