Install the Compose plugin
Important
Compose V1 no longer receives updates and will not be available in new releases of Docker Desktop after June 2023.
Compose V2 is included with all currently supported versions of Docker Desktop. For more information, see Migrate to Compose V2.
On this page you can find instructions on how to install the Compose plugin on Linux from the command line.
To install the Compose plugin on Linux, you can either:
Note
These instructions assume you already have Docker Engine and Docker CLI installed and now want to install the Compose plugin.
For Compose standalone, see Install Compose Standalone.
Install using the repository
-
Set up the repository. Find distro-specific instructions in:
-
Update the package index, and install the latest version of Docker Compose:
-
For Ubuntu and Debian, run:
$ sudo apt-get update $ sudo apt-get install docker-compose-plugin -
For RPM-based distros, run:
$ sudo yum update $ sudo yum install docker-compose-plugin
-
-
Verify that Docker Compose is installed correctly by checking the version.
$ docker compose version Docker Compose version vN.N.N
Where vN.N.N is placeholder text standing in for the latest version.
Update Compose
To update the Compose plugin, run the following commands:
-
For Ubuntu and Debian, run:
$ sudo apt-get update $ sudo apt-get install docker-compose-plugin -
For RPM-based distros, run:
$ sudo yum update $ sudo yum install docker-compose-plugin
Install the plugin manually
Note
This option requires you to manage upgrades manually. We recommend setting up Docker’s repository for easier maintenance.
-
To download and install the Compose CLI plugin, run:
$ DOCKER_CONFIG=${DOCKER_CONFIG:-$HOME/.docker} $ mkdir -p $DOCKER_CONFIG/cli-plugins $ curl -SL https://github.com/docker/compose/releases/download/v2.18.1/docker-compose-linux-x86_64 -o $DOCKER_CONFIG/cli-plugins/docker-composeThis command downloads the latest release of Docker Compose (from the Compose releases repository) and installs Compose for the active user under
$HOMEdirectory.To install:
- Docker Compose for all users on your system, replace
~/.docker/cli-pluginswith/usr/local/lib/docker/cli-plugins. - A different version of Compose, substitute
v2.18.1with the version of Compose you want to use. - For a different architecture, substitute
x86_64with the architecture you want.
- Docker Compose for all users on your system, replace
-
Apply executable permissions to the binary:
$ chmod +x $DOCKER_CONFIG/cli-plugins/docker-composeor, if you chose to install Compose for all users:
$ sudo chmod +x /usr/local/lib/docker/cli-plugins/docker-compose -
Test the installation.
$ docker compose version Docker Compose version v2.18.1