docker: 'compose' is not a docker command
docker: 'compose' is not a docker command
DodaTech
2 min read
The “docker: ‘compose’ is not a docker command” error means you are trying to use docker compose (v2 plugin) but the Docker Compose plugin is not installed. Docker ships Compose v1 as docker-compose (standalone) and v2 as a docker subcommand.
What It Means
The compose subcommand is not registered in your Docker CLI. Docker Compose is not bundled with the base Docker engine and must be installed separately — either as the standalone docker-compose binary or as the official CLI plugin.
Why It Happens
- Docker Compose was never installed.
- You installed Docker from a minimal package that excludes plugins.
- You upgraded Docker but the plugin was not upgraded or was removed.
- You are using
docker compose(v2) but only havedocker-compose(v1) installed. - The plugin directory (
~/.docker/cli-plugins/) does not containdocker-compose.
How to Fix It
1. Install the Docker Compose plugin (Linux)
sudo apt update
sudo apt install docker-compose-plugin -yFor RHEL / Fedora:
sudo yum install docker-compose-plugin2. Verify the plugin is installed
docker compose versionExpected output: Docker Compose version v2.24.0
3. Install the standalone docker-compose (v1)
sudo curl -L "https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-composeVerify:
docker-compose --version4. Install via pip (alternative)
pip install docker-composeThis installs the standalone v1 binary.
5. Install the plugin manually (all distros)
mkdir -p ~/.docker/cli-plugins
curl -SL "https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m)" -o ~/.docker/cli-plugins/docker-compose
chmod +x ~/.docker/cli-plugins/docker-composeFAQs
Built by the developers of DodaTech
Doda Browser, DodaZIP & Durga Antivirus Pro