257

I have installed docker-compose using the command

sudo apt install docker-compose

It installed docker-compose version 1.8.0 and build unknown

I need the latest version of docker-compose or at least a version of 1.9.0

Can anyone please let me know what approach I should take to upgrade it or uninstall and re-install the latest version.

I have checked the docker website and can see that they are recommending this to install the latest version'

sudo curl -L https://github.com/docker/compose/releases/download/1.21.0/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose

But before that, I have to uninstall the present version, which can be done using the command

sudo rm /usr/local/bin/docker-compose

but this can be used only when the installation was done using curl. I am not sure if the installation was done by curl as I have used

sudo apt install docker-compose

Please let me know what should I do now to uninstall and re-install the docker-compose.

James Bradbury
  • 1,708
  • 1
  • 19
  • 31
Sam_2207
  • 2,759
  • 2
  • 9
  • 15

24 Answers24

402

First, remove the old version:

If installed via apt-get

sudo apt-get remove docker-compose

If installed via curl

sudo rm /usr/local/bin/docker-compose

If installed via pip

pip uninstall docker-compose

Then find the newest version on the release page at GitHub or by curling the API and extracting the version from the response using grep or jq (thanks to dragon788, frbl, and Saber Hayati for these improvements):

# curl + grep
VERSION=$(curl --silent https://api.github.com/repos/docker/compose/releases/latest | grep -Po '"tag_name": "\K.*\d')

# curl + jq
VERSION=$(curl --silent https://api.github.com/repos/docker/compose/releases/latest | jq .name -r)

Finally, download to your favorite $PATH-accessible location and set permissions:

DESTINATION=/usr/local/bin/docker-compose
sudo curl -L https://github.com/docker/compose/releases/download/${VERSION}/docker-compose-$(uname -s)-$(uname -m) -o $DESTINATION
sudo chmod 755 $DESTINATION
Hexile
  • 65
  • 1
  • 8
Eric M. Johnson
  • 6,657
  • 2
  • 13
  • 23
  • Can you give some details about how it's not working? – Eric M. Johnson Nov 27 '18 at 01:38
  • 3
    try updating path in /usr/local/bin/docker-compose and then run `sudo chmod +x /usr/bin/docker-compose` – Raj Kumar Goyal Nov 27 '18 at 08:14
  • 2
    No need to move the file. The `/usr/local/bin` path should be in `$PATH` already. Just `chmod` in place. Answer updated to reflect this. – Gold Nov 29 '18 at 01:09
  • 4
    You probably want to do `sudo chmod 755 $DESTINATION` instead of just `+x` – Neo Apr 25 '19 at 21:32
  • 2
    Neo, good catch. I typically just adjust perms to my need in case other things have set things how they need it. But here we are downloading a fresh file. Setting all perms makes sense. – Gold May 02 '19 at 01:56
  • I follow this solution and my working doker-compose stops working and give an error like "usr/local/bin/docker-compose: 1: /usr/local/bin/docker-compose: Not: not found" – Chirag Kalal May 15 '19 at 07:06
  • @ChiragKalal Check that the binary is in that location with the proper permissions. – Eric M. Johnson May 15 '19 at 14:55
  • I don't know what was the issue but I reinstall it and it works fine. – Chirag Kalal May 16 '19 at 05:35
  • Could the owner please update his answer? for most of us the path is incorrect, besides i already did it with the right path ^^ – Rebar Aug 27 '19 at 16:55
  • 2
    @Rebar Can you please be more specific about what you want the path updated to? `/usr/local/bin` is a pretty standard place to put global binaries not managed by the packaging system. The answer also mentions specifying "your favorite $PATH-accessible location" which indicates adjusting if your `$PATH` is different. – Eric M. Johnson Aug 27 '19 at 19:53
  • 2
    If you don't want to install `jq` to get the latest version: ```VERSION=$(curl -s https://api.github.com/repos/docker/compose/releases/latest | grep -Po '"tag_name": "\K.*\d')``` – Saber Hayati Apr 17 '21 at 14:30
  • 1
    @SaberHayati thanks, included this in the answer in case they don't have jq. – Eric M. Johnson Apr 19 '21 at 05:56
  • 1
    @ChiragKalal if you get an error like `/usr/local/bin/docker-compose: Not: not found` it's probably because like me, you did `sudo su` before the last step (unnecessarily) and the subshell created doesn't have the $VERSION variable you just made – user1169420 Jun 22 '21 at 19:47
  • There is a typo in the line of Curl command, there is the correct: `sudo curl -L https://github.com/docker/compose/releases/download/$\{VERSION\}/docker-compose-$(uname -s)-$(uname -m) -o $DESTINATION` – Sidon Aug 20 '21 at 19:28
  • I don't see why you would need to escape the braces, is anyone else having an issue with them? – Eric M. Johnson Oct 16 '21 at 07:11
  • I added tab completions per https://docs.docker.com/compose/completion/ but not sure why they refer to version 1.29.2 in the URL - when I tried to most recent $VERSION it didn't work though so my tab completion might be for an older version – isapir Nov 22 '21 at 20:48
  • I mean you should just: https://docs.docker.com/compose/install/ :D – Amin Bashiri Apr 13 '22 at 06:54
  • I've used DESTINATION=/usr/bin/docker-compose – Rexcirus Jun 15 '22 at 13:13
  • 1
    and this is the curl command people with zsh: sudo curl -L https://github.com/docker/compose/releases/download/${VERSION}/docker-compose-$(uname -s)-$(uname -m) -o $DESTINATION – Suleyman Arslan Dec 28 '22 at 11:26
  • I had to remove the previous installation by which docker-compose and then rm [path of docker compose from the previous result] – Julian Egner Jun 14 '23 at 07:45
66

The easiest way to have a permanent and sustainable solution for the Docker Compose installation and the way to upgrade it, is to just use the package manager pip with:

pip install docker-compose

I was searching for a good solution for the ugly "how to upgrade to the latest version number"-problem, which appeared after you´ve read the official docs - and just found it occasionally - just have a look at the docker-compose pip package - it should reflect (mostly) the current number of the latest released Docker Compose version.

A package manager is always the best solution if it comes to managing software installations! So you just abstract from handling the versions on your own.

jonashackt
  • 12,022
  • 5
  • 67
  • 124
  • 3
    +1 great answer. Before: I had docker-compose version: docker-compose version 1.21.2, build a133471 So to upgrade to latest non-RC version, I found this to work in order to upgrade: 1) `apt install python-pip` to install PIP then `pip install docker-compose` to install the latest and then to check the version: `docker-compose --version` which gave me: docker-compose version 1.23.2, build 1110ad0 – therobyouknow Mar 25 '19 at 23:25
  • 5
    `pip install docker-compose` was giving me "Requirement already satisfied: docker-compose" so I had to do `apt-get purge docker-compose` and `hash -d docker-compose` then `pip install docker-compose` to get docker-compose 1.24 on Ubuntu 18.04. – krubo Jul 01 '19 at 12:49
  • After installing docker-compose by pip, I encountered this error: `ImportError: cannot import name 'Context'` – Benyamin Jafari Jun 26 '20 at 20:42
  • So, to deal with this error, I reinstall `docker` package by `pip` – Benyamin Jafari Jun 26 '20 at 20:50
  • No longer works for docker-compose v2+ – JohnK Jul 25 '23 at 13:17
33

If you tried sudo apt-get remove docker-compose and get E: Unable to locate package docker-compose, try this method :

This command must return a result, in order to check it is installed here :

ls -l /usr/local/bin/docker-compose

Remove the old version :

sudo rm -rf docker-compose

Download the last version (check official repo : docker/compose/releases) :

sudo curl -L "https://github.com/docker/compose/releases/download/1.24.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose

(replace 1.24.0 if needed)

Finally, apply executable permissions to the binary:

sudo chmod +x /usr/local/bin/docker-compose

Check version :

docker-compose -v
DependencyHell
  • 1,027
  • 15
  • 22
  • 5
    After doing this, I get this error - bash: /usr/bin/docker-compose: No such file or directory – Deepak Nov 12 '21 at 12:02
  • Add "v" before version number example : sudo curl -L "https://github.com/docker/compose/releases/download/v2.12.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose – Guillaume Harari Oct 19 '22 at 12:24
  • If you got error like `bash: /usr/bin/docker-compose: No such file or directory` , just run `sudo mv /usr/local/bin/docker-compose /usr/bin/docker-compose`, then you'll resolve this issue. – Jaden Mar 10 '23 at 16:16
  • Newer versions: `sudo curl -L "https://github.com/docker/compose/releases/download/v2.2.3/docker-compose-$(uname -s)-$(uname -m)" -o /usr/bin/docker-compose` – NikNik Jul 12 '23 at 06:31
24

If the above methods aren't working for you, then refer to this answer: https://stackoverflow.com/a/40554985

curl -L "https://github.com/docker/compose/releases/download/1.22.0/docker-compose-$(uname -s)-$(uname -m)" > ./docker-compose
sudo mv ./docker-compose /usr/bin/docker-compose
sudo chmod +x /usr/bin/docker-compose
kpratihast
  • 842
  • 1
  • 10
  • 23
  • 3
    While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - [From Review](/review/low-quality-posts/20350634) – Luuklag Jul 19 '18 at 18:03
  • @Luuklag Updated the answer. Thank you for the suggestion – kpratihast Jul 19 '18 at 18:52
  • It seems to be extremely slow option – TeoTN Mar 16 '19 at 20:16
  • This is by far the best solution, just needed to change the version number and I was able to update docker-compose in under a minute! With regards to the comment made by @TeoTN - this isn't a slow option at all, it's just dependent on your internet speed as it downloads the docker-compose binary directly. – c00kie Jul 09 '22 at 23:06
  • Lol, maybe the mirrors servers were upgraded withing the last three years, idk. I was on 300Mbps back then so probably the issue wasn't on my side. – TeoTN Sep 06 '22 at 16:36
  • Add "v" before version number example : sudo curl -L "github.com/docker/compose/releases/download/v2.12.0/… -s)-$(uname -m)" -o /usr/local/bin/docker-compose – Guillaume Harari Oct 19 '22 at 12:25
20

Based on @eric-johnson's answer, I'm currently using this in a script:

#!/bin/bash
compose_version=$(curl https://api.github.com/repos/docker/compose/releases/latest | jq .name -r)
output='/usr/local/bin/docker-compose'
curl -L https://github.com/docker/compose/releases/download/$compose_version/docker-compose-$(uname -s)-$(uname -m) -o $output
chmod +x $output
echo $(docker-compose --version)

it grabs the latest version from the GitHub api.

frbl
  • 1,172
  • 11
  • 17
19

Here is another oneliner to install the latest version of docker-compose using curl and sed.

curl -L "https://github.com/docker/compose/releases/download/`curl -fsSLI -o /dev/null -w %{url_effective} https://github.com/docker/compose/releases/latest | sed 's#.*tag/##g' && echo`/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose && chmod +x /usr/local/bin/docker-compose
Jakob Eriksson
  • 18,597
  • 1
  • 25
  • 34
14

Do it in three steps. (showing for apt-get installs)

  1. Uninstall the last one. e.g. for apt-get installs

sudo apt-get remove docker-compose

  1. Install the new one (https://docs.docker.com/compose/install/)

sudo curl -L "https://github.com/docker/compose/releases/download/1.29.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose

and then

 sudo chmod +x /usr/local/bin/docker-compose
  1. Check your version

docker-compose --version

ranit
  • 397
  • 3
  • 10
  • Works great, to automatically get the latest version, you could also replace step 2 by: 2a) `COMPOSE_VERSION=$(curl -s https://api.github.com/repos/docker/compose/releases/latest | grep 'tag_name' | cut -d\" -f4)` and then 2b) `sudo curl -L "https://github.com/docker/compose/releases/download/${COMPOSE_VERSION}/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose` – ATH Nov 08 '22 at 22:15
  • one additional step `ln -sf /usr/local/bin/docker-compose /usr/bin/docker-compose` – Sergey Miletskiy Feb 21 '23 at 10:56
14

Simple Solution to update docker-compose

This will remove the existing binary of docker-compose and install a new version.

sudo cd /usr/local/bin && sudo rm -rf docker-compose
sudo sudo curl -SL https://github.com/docker/compose/releases/download/v2.20.2/docker-compose-linux-x86_64 -o /usr/local/bin/docker-compose
sudo chmod +x docker-compose

for the latest version visit https://github.com/docker/compose/releases and replace the latest one with v2.20.2

  • This one is good and worked for me but it has some issues that you can solve it easily by reading the issues – Kasir Barati Dec 20 '22 at 15:32
  • @KasirBarati can you please share the issue So we make this issue free – Muhammad Irfan Aslam Dec 21 '22 at 13:48
  • Just this part did not work for me: `sudo rm /usr/local/bin/docker-compose`. I tried to update the answer but I could not since at that moment the edit queue was full. Thank you so much for your comment. – Kasir Barati Dec 27 '22 at 10:46
  • @KasirBarati thanks `sudo rm /usr/local/bin/docker-compose` is used to remove the existing docker-compose file but in some cases, it is installed in different locations like `/usr/local/bin/docker/docker-compose` that the reason first command gave error Hope it will help – Muhammad Irfan Aslam Dec 28 '22 at 08:13
  • TBH no, it was not the case for me. – Kasir Barati Dec 28 '22 at 10:35
8

I was trying to install docker-compose on "Ubuntu 16.04.5 LTS" but after installing it like this:

sudo curl -L "https://github.com/docker/compose/releases/download/1.26.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose

I was getting:

-bash: /usr/local/bin/docker-compose: Permission denied

and while I was using it with sudo I was getting:

sudo: docker-compose: command not found

So here's the steps that I took and solved my problem:

sudo curl -L "https://github.com/docker/compose/releases/download/1.26.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo ln -sf /usr/local/bin/docker-compose /usr/bin/docker-compose
sudo chmod +x /usr/bin/docker-compose
David Buck
  • 3,752
  • 35
  • 31
  • 35
ArminMz
  • 325
  • 6
  • 9
5

use this from command line: sudo curl -L "https://github.com/docker/compose/releases/download/1.22.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose

Write down the latest release version

Apply executable permissions to the binary:

sudo chmod +x /usr/local/bin/docker-compose

Then test version:

$ docker-compose --version
Community
  • 1
  • 1
5

On mac (also working on ubuntu):

sudo curl -L "https://github.com/docker/compose/releases/download/<release-version>/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose

NOTE: write the as here: https://github.com/docker/compose/releases

Yakir GIladi Edry
  • 2,511
  • 2
  • 17
  • 16
3

If you installed with pip, to upgrade you can just use:

 pip install --upgrade docker-compose

or as Mariyo states with pip3 explicitly:

 pip3 install --upgrade docker-compose
0074b60ae
  • 63
  • 5
3

Using latest flag in url will redirect you to the latest release of the repo

As OS name is lower case in github's filename, you should convert uname -s to lower case using sed -e 's/\(.*\)/\L\1/'.

sudo curl -L "https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s|sed -e 's/\(.*\)/\L\1/')-$(uname -m)" -o /usr/local/bin/docker-compose && sudo chmod +x /usr/local/bin/docker-compose
Mohammad Mostafavi
  • 337
  • 1
  • 3
  • 13
3

Docker Engine and Docker Compose Plugin

Since Microsoft took over Docker they worked on porting docker-compose to their Docker Engine CLI plugins. For future support and updates I would recommend using docker compose plugin (Notice the missing dash) which can be install via the docker-compose-plugin package. The following instructions assume that you are using Ubuntu as Distro or any Distro thats using apt as package manager.

Installation Preparations

Update your mirrors:

sudo apt-get update

Make sure the following packages are installed:

sudo apt-get install \
    ca-certificates \
    curl \
    gnupg \
    lsb-release

After that add the official Docker GPG Key:

sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg

And finally add the the stable repository:

echo \
  "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
  $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

Also make sure Docker Engine and other needed dependencies are installed:

sudo apt-get install docker-ce docker-ce-cli containerd.io

Installation of docker compose plugin

sudo apt-get install docker-compose-plugin

Any future updates of the plugin are easily applied via apt.
For further reference take a look at the official installation instructions of Docker Engine and Docker Compose.

hitshy_dev
  • 101
  • 1
  • 5
1

After a lot of looking at ways to perform this I ended up using jq, and hopefully I can expand it to handle other repos beyond Docker-Compose without too much work.

# If you have jq installed this will automatically find the latest release binary for your architecture and download it
curl --silent "https://api.github.com/repos/docker/compose/releases/latest" | jq --arg PLATFORM_ARCH "$(echo `uname -s`-`uname -m`)" -r '.assets[] | select(.name | endswith($PLATFORM_ARCH)).browser_download_url' | xargs sudo curl -L -o /usr/local/bin/docker-compose --url
dragon788
  • 3,583
  • 1
  • 40
  • 49
1

On ubuntu desktop 18.04.2, I have the 'local' removed from the path when using the curl command to install the package and it works for me. See above answer by Kshitij.

Harry
  • 1,147
  • 13
  • 13
1

Use,

$ sudo curl -L "https://github.com/docker/compose/releases/download/1.24.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose && sudo chmod +x /usr/local/bin/docker-compose

$ docker-compose -v
Deepak
  • 3,134
  • 2
  • 24
  • 24
1

In my case, using Windows + WSL2 with Ubuntu 20.04, was necessary only this:

sudo apt update

and then:

sudo apt upgrade

Henrique Holtz
  • 326
  • 2
  • 6
1

Centos/RHEL

Follow my answer below if you're using Centos7 with an x86-64 architecture. This answer is also available in my github.

Stop Your Docker Containers

I noticed other answers did not talk about stopping your docker containers/images instances before attempting to upgrade gracefully. Assumptions are inevitable but can be costly. Onward we go!

Options to update Docker-Compose

There are 2 options to upgrade docker-compose if you first downloaded and installed docker-compose using the Curl command.

  1. Using Curl, jq package, and Github's direct URL to the docker-compose repository.
  2. Using Curl, Sed, and Github's direct URL to the docker-compose repository.

Note: some of the commands below require "sudo" privileges.

Demonstration

The script below was saved to a file called "update_docker_compose.sh". You need to give this file executable permissions.

Like so:

chmod +x update_docker_compose.sh

"docker_docker_compose.sh" file content:

#!/bin/bash

# author: fullarray (stackoverflow user)
# Contribution shared on: stackoverflow.com
# Contribution also available on: github.com
# date: 06112022

# Stop current docker container running
docker stop containerID

# Remove current docker network running
docker rm containerID

# Remove image of target application(s)
docker image rm imageID

# Delete either dangling (unatagged images) docker containers or images or network
docker system prune -f

# This step depends on the jq package. 
# Uncomment jq package installation command below if using Centos7 x86-64.
# sudo yum install jq

# Declare variable to get latest version of docker-compose from github repository
compose_version=$(curl https://api.github.com/repos/docker/compose/releases/latest | jq .name -r)

# Declare variable to target installation directory
target_install_dir='/usr/local/bin/docker-compose'

# Get OS and build (assumes Linux Centos7 and x86_64)
get_local_os_build=$(uname -s)-$(uname -m)

# Execute curl command to carry download and installation operation
curl -L https://github.com/docker/compose/releases/download/$compose_version/docker-compose-$get_local_os_build -o $target_install_dir

# Use chmod to modify permissions to target installation directory (to make it executable)
chmod +x $target_install_dir

# Print docker-compose version to terminal to verify upgrade
$(docker-compose --version)

Edit the script with variables specific to your environment

The script above has a few variables you need to edit with values specific to your docker environment. For instance, you need to replace container ID and image ID with the values that the following commands output.

docker ps

and

docker images output

Once you finalize creating the file (including the edits). Switch to the directory that contains the file. For example, if you created the file in /home/username/script/update_docker_compose.sh

cd /home/username/script

Last, run the script by executing the following

./update_docker_compose.sh

Option 2

Create a script file name "update_docker_compose.sh"

Edit the file and add the following content:

#!/bin/bash

# author: fullarray (stackoverflow user)
# Contribution shared on: stackoverflow.com
# Contribution also available on: github.com
# date: 06112022

# Stop current docker container running
docker stop containerID

# Remove current docker network running
docker rm containerID

# Remove image of target application(s)
docker image rm imageID

# Delete either dangling (unatagged images) docker containers or images or network
docker system prune -f

# Declare variable to target installation directory
target_install_dir='/usr/local/bin/docker-compose'

# Get OS and build (assumes Linux Centos7 and x86_64)
get_local_os_build=$(uname -s)-$(uname -m)

# Execute curl and sed command to carry out download and installation operation
# compose_latest_version=$(curl -L "https://github.com/docker/compose/releases/download/`curl -fsSLI -o /dev/null -w %{url_effective} https://github.com/docker/compose/releases/latest | sed 's#.*tag/##g' && echo`/docker-compose-$get_local_os_build") -o $target_install_dir

# Use chmod to modify permissions to target installation directory (to make it executable)
chmod +x $target_install_dir

# Print docker-compose version to terminal to verify upgrade
$(docker-compose --version)

Edit the script with variables specific to your environment

The script above also has a few variables you need to edit with values specific to your docker environment. For instance, you need to replace container ID and image ID with the values that the following commands output.

docker ps

and

docker images output

Once you finalize creating the file (including the edits). Switch to the directory that contains the file. For example, if you created the file in /home/username/script/update_docker_compose.sh

cd /home/username/script

Last, run the script by executing the following

./update_docker_compose.sh
Full Array
  • 769
  • 7
  • 12
1

This is the method of installing docker compose version 2.12.x

Update debian package manager

# apt-get update
# apt-get install docker-compose-plugin

Then install the plugin manualy

 DOCKER_CONFIG=${DOCKER_CONFIG:-$HOME/.docker}
 mkdir -p $DOCKER_CONFIG/cli-plugins
 curl -SL https://github.com/docker/compose/releases/download/v2.12.2/docker-compose-linux-x86_64 -o $DOCKER_CONFIG/cli-plugins/docker-compose

Give permisson of execution of file

chmod +x $DOCKER_CONFIG/cli-plugins/docker-compose

Last test the installation

docker compose version
// Docker Composer Version v2.12.2
Pascal Tovohery
  • 888
  • 7
  • 19
-1

If you have homebrew you can also install via brew

$ brew install docker-compose

This is a good way to install on a Mac OS system

-1

Most of these solutions are outdated or make you install old version. To install the latest

sudo apt  install jq

DOCKER_COMPOSE_VERSION=$(curl --silent https://api.github.com/repos/docker/compose/releases/latest | jq .name -r)

sudo curl -L "https://github.com/docker/compose/releases/download/$DOCKER_COMPOSE_VERSION/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
Bat Man
  • 369
  • 1
  • 4
  • 14
-1

Well, my case was pretty weird. I am using wsl2, and Docker Desktop (Windows 11). I stop getting this error after rename the folder "docker" to "config-dev-server" and update de Dockerfile like this this:

COPY ./docker/apache/apache2.conf /etc/apache2/apache2.conf

to

COPY ./config-dev-server/apache/apache2.conf /etc/apache2/apache2.conf
R0bertinski
  • 517
  • 6
  • 12
-2

With a newer Docker Desktop for Mac 3.3.0, you don't need to install Docker Compose as a seperate package. Docker Compose comes as a first class citizen installed with Docker by default. Check out the below CLI:


docker compose version
Docker Compose version 2.0.0-beta.1%
ajeetraina
  • 60
  • 4