October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix NowOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk7 min

Fix “docker compose Is Not a Docker Command” on Linux

The Linux error “docker: 'compose' is not a docker command” means Docker cannot find the Compose V2 CLI plugin. Install docker-compose-plugin from Docker’s repository, or place the binary in a supported CLI-plugin directory, then run docker compose version.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The message docker: 'compose' is not a docker command means the Docker CLI cannot find its Compose V2 plugin. On Linux, install the docker-compose-plugin package from Docker’s repository, then confirm it with docker compose version. The command with a space (docker compose) and the older hyphenated command (docker-compose) are separate tools.

What the error means

Docker Compose V2 is not a daemon setting or a shell alias. It is a plugin that extends the Docker CLI. When you type docker compose, the first word starts the Docker client and the second word names a subcommand supplied by that plugin. If the plugin is absent, or is installed somewhere the CLI does not search, Docker treats compose as an unknown command and prints:

As an Amazon Associate I earn from qualifying purchases.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
docker: 'compose' is not a docker command

This usually occurs when Docker Engine was installed without the Compose package, when Docker’s package repository is missing or configured for the wrong Linux release, or when a manually installed plugin is in the wrong directory. It is a client-side discovery problem: adding an option to the Docker daemon will not register the command.

Check the exact command and current installation

Before changing packages, check which Docker executable is being used and whether a Compose binary is already present:

docker --version
docker compose version
docker-compose --version
  • docker --version confirms that the Docker CLI itself is available.
  • If docker compose version repeats the unknown-command error, the V2 plugin is not being discovered.
  • docker-compose --version checks for the older standalone, hyphenated program. Its presence does not make docker compose work.

Do not “fix” this by changing a script from one spelling to the other without checking what the script expects. docker compose and docker-compose are different command interfaces. A project can continue to call the hyphenated executable even after the V2 plugin is installed, while a newer project or instruction can require the space-separated form.

Preferred fix on Debian and Ubuntu

For Debian- and Ubuntu-family systems, the normal solution is to install Docker’s Compose plugin package through Docker’s official APT repository. The repository must be configured for the release you are actually running. If APT cannot locate the package, repository setup or the distribution codename is the first thing to correct; repeatedly running the install command will not solve a repository mismatch.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

1. Confirm Docker’s APT repository

Check that Docker’s official repository is enabled and targets your installed Debian or Ubuntu release. A repository entry for a different codename can leave Docker packages unavailable even though the rest of the system updates normally. If you installed Docker using a convenience script or a distribution package, verify which repository supplied the current CLI before adding another source.

2. Refresh package metadata

sudo apt-get update

Read the output rather than ignoring warnings. Errors about an unavailable release, an unreachable repository, or a missing signing key need to be resolved before package installation. A successful update does not by itself prove that the Docker repository is configured correctly; it only means APT refreshed the sources it knows about.

3. Install the plugin

sudo apt-get install docker-compose-plugin

Accept the package installation when prompted. The package adds the V2 CLI plugin; it is not the Docker daemon itself. If APT reports that docker-compose-plugin has no installation candidate, return to the repository and release check rather than substituting an unrelated package name.

4. Verify from the same account and shell

docker compose version

A working installation prints a Compose V2 version (a value beginning with v2). Run the command as the user who will run your Compose projects. If it works only with sudo, the package may be installed system-wide but your non-root Docker executable or plugin search path may differ; inspect the executable being selected with command -v docker and correct the installation rather than permanently using sudo for every Compose command.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Fix on Fedora, RHEL, and CentOS

On Fedora and the Red Hat Enterprise Linux family, enable Docker’s repository for the operating system and then install the matching plugin package. The package manager differs by release:

sudo dnf install docker-compose-plugin

On systems that still use YUM, the equivalent command is:

sudo yum install docker-compose-plugin

Use the package manager already supported by your release, and make sure the Docker repository is enabled before installing. If the package cannot be found, check the repository configuration and release compatibility first. After installation, verify with:

docker compose version

The expected result is a Compose V2 version string. Package names and repository setup can vary across RPM-family releases, so do not copy a repository definition intended for another distribution or version.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Manual installation when packages are unavailable

A manual binary is a fallback for machines where the package manager cannot be used. Compose V2 must be placed in a Docker CLI-plugin directory, not merely somewhere on your shell’s PATH. Use one of these locations:

Scope Plugin path Operational consequence
One user ~/.docker/cli-plugins/docker-compose Only that user receives the plugin.
All users /usr/local/lib/docker/cli-plugins/docker-compose The plugin is installed system-wide in the documented CLI-plugin location.

Place and enable the binary

Copy a Compose V2 binary appropriate for your Linux architecture to the selected path, then make it executable:

chmod +x ~/.docker/cli-plugins/docker-compose

For a system-wide installation, apply the same operation to the file under /usr/local/lib/docker/cli-plugins/, using administrator privileges when required. The filename must be docker-compose inside the cli-plugins directory. A binary named only docker-compose in an arbitrary directory is not automatically registered as the docker compose subcommand.

Verify discovery

docker compose version

If Docker still says that Compose is not a command, check each part of the manual installation:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • The file exists exactly at one of the supported plugin paths.
  • The filename is docker-compose, with no extra suffix.
  • The executable bit is set.
  • You are running the same Docker CLI installation for which the plugin was installed.
  • Your user can read and execute the file.

Manual installation transfers update responsibility to you. Unlike a package-managed plugin, it will not receive upgrades through your normal system update process. Record the binary’s version and replace it deliberately when you need a newer Compose V2 release.

Package install or manual binary: which should you choose?

Option Best fit Advantages Trade-off
APT package Debian or Ubuntu with Docker’s repository available Uses the system package manager and supports normal package updates Requires a correctly configured Docker repository
DNF or YUM package Fedora, RHEL, or CentOS with Docker’s repository available Integrates with the host’s RPM package workflow Repository configuration depends on the specific RPM-family release
Per-user plugin A single account or a machine where system changes are restricted Does not require a system-wide plugin location Other users cannot use it, and upgrades are manual
System-wide plugin Several users need the same Docker CLI plugin One installation is available to all users who can execute it Requires administrator access and manual upgrades

Prefer the package-managed route when the correct Docker repository is available. Use a manual path when packaging is impossible, then treat version maintenance as part of operating the host.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Troubleshoot after installation

APT says the package cannot be found

This normally indicates that Docker’s official repository is absent, disabled, or configured for the wrong codename. Run sudo apt-get update after correcting the source and retry the install. Do not assume that an Ubuntu or Debian base system automatically includes Docker’s Compose plugin in its default repositories.

The package installed, but the command is unchanged

Confirm that the shell is invoking the expected Docker binary:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
command -v docker
docker --version

A second Docker installation can be selected earlier in PATH, while the plugin was installed for another CLI location. Use the same account and executable for both the package installation and the verification command. Starting a new shell can also remove stale command lookup results after package changes.

The manual binary is ignored

Recheck the complete path and permissions. Docker searches its CLI-plugin directories; it does not treat every executable on PATH as a subcommand. The per-user path is under the invoking user’s home directory, while the system-wide path is under /usr/local/lib/docker/cli-plugins/. Installing into one account’s home directory and testing as another account will produce the same “not a docker command” message.

docker compose version works, but a project command fails

That is a different stage of the problem. A successful version check proves that the CLI can discover Compose. A later failure from docker compose up, config, or another project command may concern the project file, image access, environment variables, or Docker Engine connectivity. Keep the plugin-discovery fix separate from those runtime errors so that you do not undo a working installation.

Do not apply unrelated legacy fixes

Older troubleshooting posts sometimes suggest adding "experimental": true to /etc/docker/daemon.json. That setting is not the remedy for an unregistered Compose CLI subcommand. The error is produced because the client cannot find the Compose plugin; changing daemon configuration does not install or expose that client extension.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Likewise, Homebrew-based instructions target macOS and are not a Linux package solution. On Linux, use the Docker repository with the host’s package manager or place the Compose V2 binary in a supported CLI-plugin directory.

A repeatable repair checklist

  1. Run docker compose version and confirm that the failure is the unknown-subcommand message.
  2. Check docker --version and command -v docker so you know which CLI is being tested.
  3. On Debian or Ubuntu, verify Docker’s official APT repository matches the installed release.
  4. Run sudo apt-get update, then sudo apt-get install docker-compose-plugin.
  5. On Fedora, RHEL, or CentOS, enable Docker’s repository and run the appropriate dnf or yum install command.
  6. If packages are unavailable, put the Compose V2 binary at ~/.docker/cli-plugins/docker-compose or /usr/local/lib/docker/cli-plugins/docker-compose.
  7. Run chmod +x on the binary and test as the same user who will run Compose.
  8. Finish with docker compose version; a V2 version confirms that the CLI plugin is registered.

Bottom line

“Compose is not a docker command” on Linux almost always means that Docker Compose V2 is missing or outside the Docker CLI’s plugin search paths. Install docker-compose-plugin from Docker’s official repository when possible, use the supported manual plugin path only when necessary, and verify the repair with docker compose version. Keep the space-separated V2 command distinct from the older docker-compose executable.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.