FGF-College-Work / Forum

:beer: Espaço dedicado a discussões e tira dúvida sobre disciplinas e conteúdo tecnológico.
MIT License
13 stars 4 forks source link

Install Docker Compose #112

Open marcialwushu opened 6 years ago

marcialwushu commented 6 years ago

Prerequisites

Docker Compose relies on Docker Engine for any meaningful work, so make sure you have Docker Engine installed either locally or remote, depending on your setup.

Install Compose

Follow the instructions below to install Compose on Mac, Windows, Windows Server 2016, or Linux systems, or find out about alternatives like using the pip Python package manager or installing Compose as a container.

Alternative Install Options

Install Compose on Windows systems

Docker for Windows and Docker Toolbox already include Compose along with other Docker apps, so most Windows users do not need to install Compose separately. Docker install instructions for these are here:

If you are running the Docker daemon and client directly on Microsoft Windows Server 2016 (with Docker EE for Windows Server 2016, you do need to install Docker Compose. To do so, follow these steps:

In Powershell, since Github now requires TLS1.2, run the following:

[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12

Then run the following command to download Docker Compose, replacing $dockerComposeVersion with the specific version of Compose you want to use:

Invoke-WebRequest "https://github.com/docker/compose/releases/download/$dockerComposeVersion/docker-compose-Windows-x86_64.exe" -UseBasicParsing -OutFile $Env:ProgramFiles\docker\docker-compose.exe

For example, to download Compose version 1.22.0, the command is:

Invoke-WebRequest "https://github.com/docker/compose/releases/download/1.22.0/docker-compose-Windows-x86_64.exe" -UseBasicParsing -OutFile $Env:ProgramFiles\docker\docker-compose.exe

Use the latest Compose release number in the download command.

As already mentioned, the above command is an example, and it may become out-of-date once in a while. Always follow the command pattern shown above it. If you cut-and-paste an example, check which release it specifies and, if needed, replace $dockerComposeVersion with the release number that you want. Compose releases are also available for direct download on the Compose repository release page on GitHub.