If you ever try to use Docker Compose on Windows Server 2016 you will find out that it is not installed by default unlike Docker for Windows.
In this post, I will show you how to install Docker Compose on Windows Server 2016 and Windows Server 2016 1709.
What Is Docker Compose
Docker Compose is a JSON language tool that defines single or multiple applications using a YAML file that configures core services like Services, Volumes and Networking.
Installing docker Compose requires an internet connection and Windows PowerShell.
To install Docker Compose I will run the two lines below, The first line will configure TLS settings for Github and the second one will download Docker Compose from GitHub and copy it to C:\Program Files.
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
Invoke-WebRequest "https://github.com/docker/compose/releases/download/1.21.2/docker-compose-Windows-x86_64.exe" -UseBasicParsing -OutFile $Env:ProgramFiles\docker\docker-compose.exe
Note: to change the downloaded version number visit the link below and change the number (1.21.2)
The process takes around 2 minutes
To check it was installed I will run the line below
Below, I will run docker compose with a small application
Below is my YAML file
As you can see it runs without any issue