skip to Main Content

I tried to run

docker compose up

on a Ubuntu 24.04 LTS system and encountered the error

docker: 'compose' is not a docker command

The current docker --version is 24.0.7 which appears to be a current or very recent version.

Docker migrated away from the old docker-compose Python CLI quite some time ago, so I’m not sure why this isn’t working.

Do I possibly need to install another apt package?

A search of apt-cache search docker | grep compose gives the following results.

docker-compose - define and run multi-container Docker applications with YAML
docker-compose-v2 - tool for running multi-container applications on Docker
podman-compose - Run docker-compose.yml using podman
python3-compose - Python implementation of docker-compose file specification

2

Answers


  1. Chosen as BEST ANSWER

    docker-compose-v2 is the required apt package. Install it with

    sudo apt install docker-compose-v2
    

  2. According to the official documentation:

    For Ubuntu and Debian, run:

    • sudo apt-get update
    • sudo apt-get install docker-compose-plugin
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search