Is installing newest docker compose version (Compose V2)?

There is this install script. I used docker-compose (the old version) for several years and i want to use docker compose` for future systems, see:

Docker’s documentation refers to and describes Compose V2 functionality.

Effective July 2023, Compose V1 stopped receiving updates and is no longer in new Docker Desktop releases. Compose V2 has replaced it and is now integrated into all current Docker Desktop versions. For more information, see Migrate to Compose V2.

Normally i just run

curl -fsSL -o

in order to install docker with all other stuff out of the box. Is this script also installing docker compose or the old docker-compose aka Compose V2?

I would never use that script in the first place as long as I want to install Docker on a supported operating system. You can find a guide for supported operating systems in the documentation:

You can open the script and search for “docker-compose” in the content. Doing that I see that the compose version depends on the Docker version, so if that Docker version supports Compose v2 as a docker cli plugin, that will be installed.

I would be surprised if that script installed Compose v1 ever, since it was a Python package and not part of Docker. The following code snippet is from the debian installation process in the script:

if version_gte "18.09"; then
    # older versions didn't ship the cli and containerd as separate packages
    pkgs="$pkgs docker-ce-cli${cli_pkg_version%=}"
if version_gte "20.10"; then
    pkgs="$pkgs docker-compose-plugin docker-ce-rootless-extras$pkg_version"
if version_gte "23.0"; then
    pkgs="$pkgs docker-buildx-plugin"
if ! is_dry_run; then
  set -x
$sh_c "DEBIAN_FRONTEND=noninteractive apt-get install -y -qq $pkgs >/dev/null"
1 Like