Docker Compose allows you to run complex applications in a single command. This makes it possible to deploy containers faster and more efficiently. Follow the steps in our tutorial to install Docker Compose on Windows.
Docker Compose on Windows: what prerequisites?¶
Docker Compose is an integral part of Docker Desktop for Windows. To use the standalone version of Docker Compose, make sure you meet the following requirements:
- DockerEngine : Compose is a Docker Engine extension that you need to install. Make sure you have installed the Docker server and client binaries;
- Operating system : Windows with administrator privileges.
Install Docker Compose on Windows: step-by-step guide¶
If you want to install and use Docker Compose, it is necessary to have the Docker daemon and Docker client running directly on your Windows server. So make sure that the service Docker works correctly.
Step 1: Launch PowerShell¶
First open PowerShell with a profile administrator. When asked if you want to allow the app to make changes to your device, click « Yes. »
Step 2: Configure TLS security protocol¶
GitHub requires security protocol by default TLS1.2. Run the following command in Windows PowerShell:
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
powershell
Step 3: Download and install Docker Compose¶
Download the last version from Compose (v2.17.2) on GitHub:
Start-BitsTransfer -Source "https://github.com/docker/compose/releases/download/v2.17.2/docker-compose-Windows-x86_64.exe" -Destination $Env:ProgramFiles\Docker\docker-compose.exe
powershell
To install a different version, simply replace v2.17.2
in the target address by the desired version number.
Step 3: Test Docker Compose¶
Verify that the installation was successful by displaying the current version of Compose:
docker compose version
powershell
This is what the output should look like: