skip to Main Content

I can check if docker is installed through the which docker or command -v docker commands. But I need to check if docker’s compose plugin is installed (I will use it like docker compose up -d later).

3

Answers


  1. You can just check for docker-compose version docker-compose --version

    If docker-compose is not installed, It will throw an error docker-compose in unrecognized.

    Login or Signup to reply.
  2. Write on terminal:

    $ docker compose --version
    

    The return would look like:

    Docker version X.Y.Z, build 95e78f4241
    

    Source: https://docs.docker.com/engine/reference/commandline/compose/

    Login or Signup to reply.
  3. For me it worked a little bit differently, docker compose --version just gave me the CLI options of docker.

    hotfix@localhost:~$ docker -v
    Docker version 23.0.1, build a5ee5b1
    hotfix@localhost:~$ docker compose version
    Docker Compose version v2.16.0
    

    I am using Ubuntu 22.04.01 LTS and I followed these instructions from Docker for installation.

    ⚠️ Note

    Beware that Docker is currently transitioning from Compose v1 to v2. The older version is called docker-compose which version you can check with:

    docker-compose --version
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search