Check if docker-compose is installed on my macOS machine?

nick asked this question 1 year, 5 months ago
nick on Apr 25, 2022

How do I check if Docker compose is installed on my machine?

Can I do this via the command line?

My macOS machine is running Monterey version 12.3.

3 suggested answers
yaboy01 on May 14, 2022 · Edited

You can just execute the docker-compose command:


If docker-compose is installed on your machine, it should list out the commands:

Usage:  docker compose [OPTIONS] COMMAND

Docker Compose

      --ansi string                Control when to print ANSI control characters ("never"|"always"|"auto") (default "auto")
      --compatibility              Run compose in backward compatibility mode
      --env-file string            Specify an alternate environment file.
  -f, --file stringArray           Compose configuration files
      --profile stringArray        Specify a profile to enable
      --project-directory string   Specify an alternate working directory
                                   (default: the path of the Compose file)
  -p, --project-name string        Project name

  build       Build or rebuild services
  convert     Converts the compose file to platform's canonical format

. . .

If not, you'll get an error output similar to this:

-bash: docker-compose: command not found
0 replies
softwareguy411 on May 14, 2022 · Edited

Execute this command to get the version of docker-compose installed on your machine:

docker-compose --version

If docker-compose is installed to your machine, it should output a version number like this:

Docker Compose version 2.4.1
0 replies
itsbambi on May 14, 2022

The which command should work for this:

which docker-compose

If Docker Compose is installed on you machine, it should output the path to the executive:

0 replies