mirror of https://github.com/docker/docs.git
ENGDOCS 711 Revisited Compose Install Page (#14838)
Revisiting Compose installation
This commit is contained in:
parent
8ff61b5097
commit
d49af6a449
|
@ -1390,7 +1390,6 @@ manuals:
|
|||
title: Engine 1.13 and earlier
|
||||
- path: /engine/deprecated/
|
||||
title: Deprecated features
|
||||
|
||||
- path: /buildx/working-with-buildx/
|
||||
title: Docker Buildx
|
||||
- path: /engine/context/working-with-contexts/
|
||||
|
@ -1399,13 +1398,20 @@ manuals:
|
|||
title: Docker Scan
|
||||
- path: /engine/sbom/
|
||||
title: Docker SBOM (Experimental)
|
||||
|
||||
- sectiontitle: Docker Compose
|
||||
section:
|
||||
- path: /compose/
|
||||
title: Overview of Docker Compose
|
||||
- path: /compose/install/
|
||||
title: Install Compose
|
||||
- sectiontitle: Install Compose
|
||||
section:
|
||||
- path: /compose/install/
|
||||
title: Install Docker Compose
|
||||
- path: /compose/install/compose-desktop/
|
||||
title: Install Compose plugin through Desktop
|
||||
- path: /compose/install/compose-plugin/
|
||||
title: Install Docker Compose Plugin
|
||||
- path: /compose/install/uninstall/
|
||||
title: Uninstall Docker Compose
|
||||
- path: /compose/gettingstarted/
|
||||
title: Getting started
|
||||
- path: /compose/environment-variables/
|
||||
|
|
|
@ -127,7 +127,7 @@ Enjoy working with Compose faster and with fewer typos!
|
|||
## Compose documentation
|
||||
|
||||
- [User guide](index.md)
|
||||
- [Installing Compose](install.md)
|
||||
- [Installing Compose](install/index.md)
|
||||
- [Command line reference](reference/index.md)
|
||||
- [Compose file reference](compose-file/index.md)
|
||||
- [Sample apps with Compose](samples-for-compose.md)
|
||||
|
|
|
@ -1979,7 +1979,7 @@ networks:
|
|||
## Compose documentation
|
||||
|
||||
- [User guide](../index.md)
|
||||
- [Installing Compose](../install.md)
|
||||
- [Installing Compose](../install/index.md)
|
||||
- [Compose file versions and upgrading](compose-versioning.md)
|
||||
- [Sample apps with Compose](../samples-for-compose.md)
|
||||
- [Command line reference](../reference/index.md)
|
||||
|
|
|
@ -2760,7 +2760,7 @@ stack.
|
|||
## Compose documentation
|
||||
|
||||
- [User guide](../index.md)
|
||||
- [Installing Compose](../install.md)
|
||||
- [Installing Compose](../install/index.md)
|
||||
- [Compose file versions and upgrading](compose-versioning.md)
|
||||
- [Sample apps with Compose](../samples-for-compose.md)
|
||||
- [Command line reference](../reference/index.md)
|
||||
|
|
|
@ -2501,7 +2501,7 @@ for complex elements, interpolation MUST be applied _before_ merge on a per-file
|
|||
## Compose documentation
|
||||
|
||||
- [User guide](../index.md)
|
||||
- [Installing Compose](../install.md)
|
||||
- [Installing Compose](../install/index.md)
|
||||
- [Compose file versions and upgrading](compose-versioning.md)
|
||||
- [Sample apps with Compose](../samples-for-compose.md)
|
||||
- [Enabling GPU access with Compose](../gpu-support.md)
|
||||
|
|
|
@ -61,7 +61,7 @@ in your Compose file, and can also be used to define the following
|
|||
## More Compose documentation
|
||||
|
||||
- [User guide](index.md)
|
||||
- [Installing Compose](install.md)
|
||||
- [Installing Compose](install/index.md)
|
||||
- [Getting Started](gettingstarted.md)
|
||||
- [Command line reference](reference/index.md)
|
||||
- [Compose file reference](compose-file/index.md)
|
||||
|
|
|
@ -457,7 +457,7 @@ services:
|
|||
## Compose documentation
|
||||
|
||||
- [User guide](index.md)
|
||||
- [Installing Compose](install.md)
|
||||
- [Installing Compose](install/index.md)
|
||||
- [Getting Started](gettingstarted.md)
|
||||
- [Command line reference](reference/index.md)
|
||||
- [Compose file reference](compose-file/index.md)
|
||||
|
|
|
@ -116,7 +116,7 @@ GitHub](https://github.com/search?q=in%3Apath+docker-compose.yml+extension%3Ayml
|
|||
## Compose documentation
|
||||
|
||||
- [User guide](index.md)
|
||||
- [Installing Compose](install.md)
|
||||
- [Installing Compose](install/index.md)
|
||||
- [Getting Started](gettingstarted.md)
|
||||
- [Command line reference](reference/index.md)
|
||||
- [Compose file reference](compose-file/index.md)
|
||||
|
|
|
@ -12,7 +12,7 @@ understandable even if you're not familiar with it.
|
|||
## Prerequisites
|
||||
|
||||
Make sure you have already installed both [Docker Engine](../get-docker.md)
|
||||
and [Docker Compose](install.md). You don't need to install Python or Redis, as
|
||||
and [Docker Compose](install/index.md). You don't need to install Python or Redis, as
|
||||
both are provided by Docker images.
|
||||
|
||||
## Step 1: Setup
|
||||
|
|
|
@ -76,7 +76,7 @@ Compose has commands for managing the whole lifecycle of your application:
|
|||
|
||||
If you rely on using Docker Compose as `docker-compose` (with a hyphen), you can
|
||||
set up Compose V2 to act as a drop-in replacement of the previous `docker-compose`.
|
||||
Refer to the [Installing Compose](install.md) section for detailed instructions.
|
||||
Refer to the [Installing Compose](install/index.md) section for detailed instructions.
|
||||
|
||||
## Context of Docker Compose evolution
|
||||
|
||||
|
|
|
@ -1,283 +0,0 @@
|
|||
---
|
||||
description: How to install Docker Compose
|
||||
keywords: compose, orchestration, install, installation, docker, documentation
|
||||
title: Install Docker Compose
|
||||
toc_max: 2
|
||||
---
|
||||
|
||||
This page contains information on how to install Docker Compose. You can run Compose on macOS, Windows, and 64-bit Linux.
|
||||
|
||||
## 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.
|
||||
|
||||
- On desktop systems like Docker Desktop for Mac and Windows, Docker Compose is
|
||||
included as part of those desktop installs.
|
||||
|
||||
- On Linux systems, you can install Docker Compose with the Docker Engine using the
|
||||
[convenience script](../engine/install/index.md#server){: target="_blank" rel="noopener" class="_"}. Select the install Docker Engine page for your distribution and then look for instructions on installing using the convenience script.
|
||||
Otherwise, you should first install the [Docker Engine](../engine/install/index.md#server){: target="_blank" rel="noopener" class="_"}
|
||||
for your OS and then refer to this page for
|
||||
instructions on installing Compose on
|
||||
Linux systems.
|
||||
|
||||
- To run Compose as a non-root user, see [Manage Docker as a non-root user](../engine/install/linux-postinstall.md).
|
||||
|
||||
## Install Compose
|
||||
|
||||
Follow the instructions below to install Compose on Mac, Windows, Windows Server, or Linux systems.
|
||||
|
||||
> Install a different version
|
||||
>
|
||||
> The instructions below outline installation of the current stable release
|
||||
> (**{{site.compose_version}}**) of Compose. To install a different version of
|
||||
> Compose, replace the given release number with the one that you want.
|
||||
>
|
||||
> Compose releases are also listed and available for direct download on the
|
||||
> [Compose repository release page on GitHub](https://github.com/docker/compose/releases){:target="_blank" rel="noopener" class="_"}.
|
||||
>
|
||||
> To install the Python version of Compose, follow instructions in the [Compose v1 GitHub branch](https://github.com/docker/compose/blob/master/INSTALL.md){: target="_blank" rel="noopener" class="_"}.
|
||||
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active"><a data-toggle="tab" data-target="#macOS">Mac</a></li>
|
||||
<li><a data-toggle="tab" data-target="#windows">Windows</a></li>
|
||||
<li><a data-toggle="tab" data-target="#windows-server">Windows Server</a></li>
|
||||
<li><a data-toggle="tab" data-target="#linux">Linux</a></li>
|
||||
<li><a data-toggle="tab" data-target="#linux-standalone">Linux Standalone binary</a></li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<div id="macOS" class="tab-pane fade in active" markdown="1">
|
||||
|
||||
### Install Compose on macOS
|
||||
|
||||
**Docker Desktop for Mac** includes Compose along
|
||||
with other Docker apps, so Mac users do not need to install Compose separately.
|
||||
For installation instructions, see [Install Docker Desktop on Mac](../desktop/mac/install.md).
|
||||
|
||||
</div>
|
||||
<div id="windows" class="tab-pane fade" markdown="1">
|
||||
|
||||
### Install Compose on Windows desktop systems
|
||||
|
||||
**Docker Desktop for Windows** includes Compose
|
||||
along with other Docker apps, so most Windows users do not need to
|
||||
install Compose separately. For install instructions, see [Install Docker Desktop on Windows](../desktop/windows/install.md).
|
||||
|
||||
If you are running the Docker daemon and client directly on Microsoft
|
||||
Windows Server, follow the instructions in the Windows Server tab.
|
||||
|
||||
</div>
|
||||
<div id="windows-server" class="tab-pane fade" markdown="1">
|
||||
|
||||
### Install Compose on Windows Server
|
||||
|
||||
Follow these instructions if you are running the Docker daemon and client directly
|
||||
on Microsoft Windows Server and want to install Docker Compose.
|
||||
|
||||
|
||||
1. Start an "elevated" PowerShell (run it as administrator).
|
||||
Search for PowerShell, right-click, and choose
|
||||
**Run as administrator**. When asked if you want to allow this app
|
||||
to make changes to your device, click **Yes**.
|
||||
|
||||
2. In PowerShell, since GitHub now requires TLS1.2, run the following:
|
||||
|
||||
```powershell
|
||||
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
|
||||
```
|
||||
|
||||
Then run the following command to download the current stable release of
|
||||
Compose ({{site.compose_version}}):
|
||||
|
||||
```powershell
|
||||
Invoke-WebRequest "https://github.com/docker/compose/releases/download/{{site.compose_version}}/docker-compose-Windows-x86_64.exe" -UseBasicParsing -OutFile $Env:ProgramFiles\Docker\docker-compose.exe
|
||||
```
|
||||
|
||||
> **Note**
|
||||
>
|
||||
> On Windows Server 2019, you can add the Compose executable to `$Env:ProgramFiles\Docker`. Because this directory is registered in the system `PATH`, you can run the `docker-compose --version` command on the subsequent step with no additional configuration.
|
||||
|
||||
> To install a different version of Compose, substitute `{{site.compose_version}}`
|
||||
> with the version of Compose you want to use.
|
||||
|
||||
3. Test the installation.
|
||||
|
||||
```console
|
||||
$ docker compose version
|
||||
Docker Compose version {{site.compose_version}}
|
||||
```
|
||||
</div>
|
||||
<div id="linux" class="tab-pane fade" markdown="1">
|
||||
|
||||
### Install Compose on Linux systems
|
||||
|
||||
You can install Docker Compose in different ways, depending on your needs:
|
||||
|
||||
- In testing and development environments, some users choose to use automated
|
||||
[convenience scripts](#install-using-the-convenience-script) to install Docker.
|
||||
- Most users [set up Docker's repositories](#install-using-the-repository) and
|
||||
install from them, for ease of installation and upgrade tasks. This is the
|
||||
recommended approach.
|
||||
- Some users [download and install the binary](#install-the-binary-manually),
|
||||
and manage upgrades manually.
|
||||
|
||||
|
||||
#### Install using the convenience script
|
||||
|
||||
As Docker Compose is now part of the Docker CLI it can be installed via a convenience script with Docker Engine and the CLI.
|
||||
[Choose your Linux distribution](../engine/install/index.md#server) and follow the instructions.
|
||||
|
||||
|
||||
#### Install using the repository
|
||||
|
||||
If you already follow the instructions to install Docker Engine, Docker Compose should already be installed.
|
||||
Otherwise, you can set up the Docker repository as mentioned in the Docker Engine installation, [choose your Linux distribution](../engine/install/index.md#server) and go to the `Set up the repository` section.
|
||||
|
||||
When finished
|
||||
|
||||
1. Update the `apt` package index, and install the _latest version_ of Docker Compose, or go to the next step to install a specific version:
|
||||
|
||||
```console
|
||||
$ sudo apt-get update
|
||||
$ sudo apt-get install docker-compose-plugin
|
||||
```
|
||||
|
||||
|
||||
2. To install a _specific version_ of Docker Engine, list the available versions
|
||||
in the repo, then select and install:
|
||||
|
||||
a. List the versions available in your repo:
|
||||
|
||||
```console
|
||||
$ apt-cache madison docker-compose-plugin
|
||||
|
||||
docker-compose-plugin | 2.3.3~ubuntu-focal | https://download.docker.com/linux/ubuntu focal/stable arm64 Packages
|
||||
```
|
||||
|
||||
b. Install a specific version using the version string from the second column,
|
||||
for example, `2.3.3~ubuntu-focal`.
|
||||
|
||||
```console
|
||||
$ sudo apt-get install docker-compose-plugin=<VERSION_STRING>
|
||||
```
|
||||
|
||||
3. Verify that Docker Compose is installed correctly by checking the version.
|
||||
|
||||
```console
|
||||
$ docker compose version
|
||||
Docker Compose version v2.3.3
|
||||
```
|
||||
|
||||
|
||||
#### Install the binary manually
|
||||
|
||||
On Linux, you can download the Docker Compose binary from the
|
||||
[Compose repository release page on GitHub](https://github.com/docker/compose/releases){:target="_blank" rel="noopener" class="_"} and copying it into `$HOME/.docker/cli-plugins` as `docker-compose`.
|
||||
Follow the instructions from the link, which involve running the `curl` command
|
||||
in your terminal to download the binaries. These step-by-step instructions are
|
||||
also included below.
|
||||
|
||||
1. Run this command to download the current stable release of Docker Compose:
|
||||
|
||||
```console
|
||||
$ DOCKER_CONFIG=${DOCKER_CONFIG:-$HOME/.docker}
|
||||
$ mkdir -p $DOCKER_CONFIG/cli-plugins
|
||||
$ curl -SL https://github.com/docker/compose/releases/download/{{site.compose_version}}/docker-compose-linux-x86_64 -o $DOCKER_CONFIG/cli-plugins/docker-compose
|
||||
```
|
||||
|
||||
This command installs Compose for the active user under `$HOME` directory. To install Docker Compose for all users on your system, replace `~/.docker/cli-plugins` with `/usr/local/lib/docker/cli-plugins`.
|
||||
|
||||
|
||||
> To install a different version of Compose, substitute `{{site.compose_version}}`
|
||||
> with the version of Compose you want to use.
|
||||
|
||||
2. Apply executable permissions to the binary:
|
||||
|
||||
```console
|
||||
$ chmod +x $DOCKER_CONFIG/cli-plugins/docker-compose
|
||||
```
|
||||
or if you choose to install Compose for all users
|
||||
```console
|
||||
$ sudo chmod +x /usr/local/lib/docker/cli-plugins/docker-compose
|
||||
```
|
||||
|
||||
3. Test the installation.
|
||||
|
||||
```console
|
||||
$ docker compose version
|
||||
Docker Compose version {{site.compose_version}}
|
||||
```
|
||||
</div>
|
||||
<div id="linux-standalone" class="tab-pane fade" markdown="1">
|
||||
|
||||
|
||||
### Install Compose as standalone binary on Linux systems
|
||||
|
||||
You can use Compose as a standalone binary without installing the Docker CLI.
|
||||
|
||||
1. Run this command to download the current stable release of Docker Compose:
|
||||
|
||||
```console
|
||||
$ curl -SL https://github.com/docker/compose/releases/download/{{site.compose_version}}/docker-compose-linux-x86_64 -o /usr/local/bin/docker-compose
|
||||
```
|
||||
|
||||
> To install a different version of Compose, substitute `{{site.compose_version}}`
|
||||
> with the version of Compose you want to use.
|
||||
|
||||
2. Apply executable permissions to the binary:
|
||||
|
||||
```console
|
||||
$ sudo chmod +x /usr/local/bin/docker-compose
|
||||
```
|
||||
|
||||
> **Note**:
|
||||
>
|
||||
> If the command `docker-compose` fails after installation, check your path.
|
||||
> You can also create a symbolic link to `/usr/bin` or any other directory in your path.
|
||||
>
|
||||
> For example:
|
||||
> ```console
|
||||
> $ sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
|
||||
> ```
|
||||
|
||||
3. Test the installation.
|
||||
|
||||
```console
|
||||
$ docker-compose --version
|
||||
Docker Compose version {{site.compose_version}}
|
||||
```
|
||||
</div>
|
||||
</div>
|
||||
|
||||
----
|
||||
|
||||
## Uninstallation
|
||||
|
||||
To uninstall Docker Compose if you installed using `curl`:
|
||||
|
||||
```console
|
||||
$ rm $DOCKER_CONFIG/cli-plugins/docker-compose
|
||||
```
|
||||
|
||||
or if you choose to install Compose for all users
|
||||
|
||||
```console
|
||||
$ sudo rm /usr/local/lib/docker/cli-plugins/docker-compose
|
||||
```
|
||||
|
||||
> Got a "Permission denied" error?
|
||||
>
|
||||
> If you get a "Permission denied" error using either of the above
|
||||
> methods, you probably do not have the proper permissions to remove
|
||||
> `docker-compose`. To force the removal, prepend `sudo` to either of the above
|
||||
> commands and run again.
|
||||
|
||||
|
||||
## Where to go next
|
||||
|
||||
- [User guide](index.md)
|
||||
- [Getting Started](gettingstarted.md)
|
||||
- [Command line reference](reference/index.md)
|
||||
- [Compose file reference](compose-file/index.md)
|
||||
- [Sample apps with Compose](samples-for-compose.md)
|
|
@ -0,0 +1,23 @@
|
|||
---
|
||||
description: How to install Docker Compose through Docker Desktop
|
||||
keywords: compose, orchestration, install, installation, docker, documentation
|
||||
|
||||
title: Install Compose through Docker Desktop
|
||||
---
|
||||
|
||||
|
||||
|
||||
With Docker Desktop you get Docker Engine, Docker CLI with Compose plugin as well as other components and tools.
|
||||
Check a list of what's shipped with Docker Desktop and a list of key features in the [Docker Desktop Overview](../../desktop/index.md){:target="_blank" rel="noopener" class="_"} page.
|
||||
|
||||
Docker Desktop is available for Mac, Windows and Linux.
|
||||
For download information, system requirements, and installation instructions, see:
|
||||
|
||||
* [Docker Desktop for Linux](../../desktop/linux/install.md){:target="_blank" rel="noopener" class="_"}
|
||||
* [Docker Desktop for Mac](../../desktop/mac/install.md){:target="_blank" rel="noopener" class="_"}
|
||||
* [Docker Desktop for Windows](../../desktop/windows/install.md){:target="_blank" rel="noopener" class="_"}
|
||||
|
||||
For information about Docker Desktop licensing, see [Docker Desktop License Agreement](../../subscription/index.md#docker-desktop-license-agreement){:target="_blank" rel="noopener" class="_"}.
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,194 @@
|
|||
---
|
||||
description: How to install Docker Compose CLI plugin
|
||||
keywords: compose, orchestration, install, installation, docker, documentation
|
||||
toc_max: 3
|
||||
|
||||
title: Install Docker Compose CLI plugin
|
||||
---
|
||||
|
||||
In this page you can find instructions on how to install Compose Plugin for Docker CLI in:
|
||||
* Linux
|
||||
* Windows Server
|
||||
|
||||
|
||||
## Compose Prerequisites
|
||||
|
||||
* Docker Compose requires Docker Engine.
|
||||
* Docker Compose plugin requires Docker CLI.
|
||||
|
||||
|
||||
## Installing Compose on Linux systems
|
||||
|
||||
In this section you can find various routes for installing Compose in Linux.
|
||||
|
||||
### Installation Methods
|
||||
|
||||
* [Installing Docker Desktop for Linux](../../desktop/linux/install.md/){:target="_blank" rel="noopener" class="_"} is the easiest and recommended installation route.
|
||||
Check the Desktop for Linux [supported platforms](../../desktop/linux/install.md/#supported-platforms){:target="_blank" rel="noopener" class="_"} page to verify the supported Linux distributions and architectures.
|
||||
|
||||
|
||||
The following other methods are possible:
|
||||
|
||||
* __Using the automated convenience scripts__ (for testing and development environments).
|
||||
These scripts install Docker Engine and Docker CLI with the Compose plugin.
|
||||
For this route, go to the [Docker Engine install](../../../engine/install/){:target="_blank" rel="noopener" class="_"}
|
||||
page and follow the provided instructions. _After Desktop for Linux this is the recommended route._
|
||||
|
||||
* __Setting up Docker's repository__ and using it to install Docker CLI Compose plugin. See the [Install using the repository](#install-using-the-repository) section in this page. _This is the second best route._
|
||||
|
||||
* __Installing the Docker CLI Compose plugin binary manually__. See the [Install the plugin manually](#install-the-plugin-manually) section in this page. _Note that this option requires you to manage upgrades manually as well._
|
||||
|
||||
|
||||
### Install using the repository
|
||||
|
||||
> **Note**
|
||||
>
|
||||
>These instructions assume you already have Docker Engine and Docker CLI installed and now want to install the Compose plugin.
|
||||
For other Linux installation methods see [this summary](#installation-methods).
|
||||
|
||||
>To run Compose as a non-root user, see [Manage Docker as a non-root user](../../engine/install/linux-postinstall.md){:target="_blank" rel="noopener" class="_"}.
|
||||
|
||||
|
||||
If you have already set up the Docker repository jump to step 2.
|
||||
|
||||
1. Set up the repository. Go to the "Set up the repository" section of the chosen [Linux distribution](../../engine/install/index.md#server){:target="_blank" rel="noopener" class="_"}. found in the Docker Engine installation pages to check the instructions.
|
||||
|
||||
2. Update the `apt` package index, and install the _latest version_ of Docker Compose:
|
||||
|
||||
> Or, if using a different distro, use the equivalent package manager instructions.
|
||||
|
||||
|
||||
```console
|
||||
$ sudo apt-get update
|
||||
$ sudo apt-get install docker-compose-plugin
|
||||
```
|
||||
|
||||
Alternatively, to install a specific version of Compose CLI plugin:
|
||||
|
||||
a. List the versions available in your repo:
|
||||
|
||||
|
||||
```console
|
||||
$ apt-cache madison docker-compose-plugin
|
||||
|
||||
docker-compose-plugin | 2.3.3~ubuntu-focal | https://download.docker.com/linux/ubuntu focal/stable arm64 Packages
|
||||
```
|
||||
|
||||
b. From the list obtained use the version string you can in the second column to specify the version you wish to install.
|
||||
|
||||
c. Install the selected version:
|
||||
|
||||
|
||||
```console
|
||||
$ sudo apt-get install docker-compose-plugin=<VERSION_STRING>
|
||||
```
|
||||
where `<VERSION_STRING>` is, for example,`2.3.3~ubuntu-focal`.
|
||||
|
||||
3. Verify that Docker Compose is installed correctly by checking the version.
|
||||
|
||||
```console
|
||||
$ docker compose version
|
||||
Docker Compose version v2.3.3
|
||||
```
|
||||
|
||||
### Install the Plugin manually
|
||||
|
||||
> **Note**
|
||||
>
|
||||
> These instructions assume you already have Docker Engine and Docker CLI installed and now want to install the Compose plugin.
|
||||
>
|
||||
> Note as well this option requires you to manage upgrades manually. Whenever possible we recommend any of the other installation methods listed. For other Linux installation methods see [this summary](#installation-methods).
|
||||
|
||||
>To run Compose as a non-root user, see [Manage Docker as a non-root user](../../engine/install/linux-postinstall.md).
|
||||
|
||||
|
||||
1. To download and install the Compose CLI plugin, run:
|
||||
|
||||
```console
|
||||
$ DOCKER_CONFIG=${DOCKER_CONFIG:-$HOME/.docker}
|
||||
$ mkdir -p $DOCKER_CONFIG/cli-plugins
|
||||
$ curl -SL https://github.com/docker/compose/releases/download/{{site.compose_version}}/docker-compose-linux-x86_64 -o $DOCKER_CONFIG/cli-plugins/docker-compose
|
||||
```
|
||||
|
||||
This command downloads the latest release of Docker Compose (from the Compose releases repository) and installs Compose for _the active user_ under `$HOME` directory.
|
||||
|
||||
> To install:
|
||||
>* Docker Compose for _all users_ on your system, replace `~/.docker/ cli-plugins` with `/usr/local/lib/docker/cli-plugins`.
|
||||
>* A different version of Compose, substitute `{{site.compose_version}}` with the version of Compose you want to use.
|
||||
|
||||
2. Apply executable permissions to the binary:
|
||||
|
||||
```console
|
||||
$ chmod +x $DOCKER_CONFIG/cli-plugins/docker-compose
|
||||
```
|
||||
or, if you chose to install Compose for all users:
|
||||
|
||||
```console
|
||||
$ sudo chmod +x /usr/local/lib/docker/cli-plugins/docker-compose
|
||||
```
|
||||
|
||||
3. Test the installation.
|
||||
|
||||
```console
|
||||
$ docker compose version
|
||||
Docker Compose version {{site.compose_version}}
|
||||
```
|
||||
|
||||
> **Note**
|
||||
>
|
||||
>__Compose standalone__: If you need to use Compose without installing the Docker CLI, the instructions for the standalone scenario are similar.
|
||||
> Note the target folder for the binary's installation is different as well as the compose syntax used with the plugin (_space compose_) or the standalone version (_dash compose_).
|
||||
|
||||
1. To download and install Compose standalone, run:
|
||||
```console
|
||||
$ curl -SL https://github.com/docker/compose/releases/download/{{site.compose_version}}/docker-compose-linux-x86_64 -o /usr/local/bin/docker-compose
|
||||
```
|
||||
2. Apply executable permissions to the standalone binary in the target path for the installation.
|
||||
3. Test and execute compose commands using `docker-compose`.
|
||||
|
||||
> **Note**
|
||||
>
|
||||
> If the command `docker-compose` fails after installation, check your path.
|
||||
> You can also create a symbolic link to `/usr/bin` or any other directory in your path.
|
||||
> For example:
|
||||
> ```console
|
||||
> $ sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
|
||||
> ```
|
||||
|
||||
|
||||
## Install Compose on Windows Server
|
||||
|
||||
Follow these instructions if you are running the Docker daemon and client directly
|
||||
on Microsoft Windows Server and want to install Docker Compose.
|
||||
|
||||
|
||||
1. Run a PowerShell as an administrator.
|
||||
When asked if you want to allow this app to make changes to your device, click **Yes** in order to proceed with the installation.
|
||||
|
||||
2. GitHub now requires TLS1.2. In PowerShell, run the following:
|
||||
|
||||
```powershell
|
||||
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
|
||||
```
|
||||
3. Run the following command to download the latest release of Compose ({{site.compose_version}}):
|
||||
|
||||
```powershell
|
||||
Invoke-WebRequest "https://github.com/docker/compose/releases/download/{{site.compose_version}}/docker-compose-Windows-x86_64.exe" -UseBasicParsing -OutFile $Env:ProgramFiles\Docker\docker-compose.exe
|
||||
```
|
||||
|
||||
> **Note**
|
||||
>
|
||||
> On Windows Server 2019 you can add the Compose executable to `$Env:ProgramFiles\Docker`.
|
||||
Because this directory is registered in the system `PATH`, you can run the `docker-compose --version`
|
||||
command on the subsequent step with no additional configuration.
|
||||
|
||||
> To install a different version of Compose, substitute `{{site.compose_version}}`
|
||||
> with the version of Compose you want to use.
|
||||
|
||||
3. Test the installation.
|
||||
|
||||
```console
|
||||
$ docker compose version
|
||||
Docker Compose version {{site.compose_version}}
|
||||
```
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
---
|
||||
description: How to install Docker Compose
|
||||
keywords: compose, orchestration, install, installation, docker, documentation
|
||||
title: Install Docker Compose
|
||||
toc_max: 2
|
||||
---
|
||||
|
||||
In this page you can find a summary of the available options for installing Compose.
|
||||
|
||||
## Compose Prerequisites
|
||||
|
||||
* Docker Compose requires Docker Engine.
|
||||
* Docker Compose plugin requires Docker CLI.
|
||||
|
||||
## Compose Installation Scenarios
|
||||
You can run Compose on macOS, Windows, and 64-bit Linux. Check what installation scenario fits your needs.
|
||||
|
||||
Are you looking to:
|
||||
|
||||
* __Get latest Compose and its prerequisites right of the bat__:
|
||||
[Install Docker Desktop for your platform](compose-desktop.md). This is the fastest route and you get Docker Engine and Docker CLI with the Compose plugin. Docker Desktop is available for Mac, Windows and Linux.
|
||||
|
||||
* __Install Compose plug in:__
|
||||
+ __(Mac, Win, Linux) Docker Desktop__: If you have Desktop installed then you already have the Compose plugin installed.
|
||||
+ __Linux systems__: To install the Docker CLI's Compose plugin,s use one of these methods of installation:
|
||||
+ Using the [convenience scripts](../../engine/install/index.md#server){: target="_blank" rel="noopener" class="_"} offered per Linux distro from the Engine install section.
|
||||
+ [Setting up Docker's repository](compose-plugin#install-using-the-repository) and using it to install the compose plugin package.
|
||||
+ Other scenarios, check the [Linux install](compose-plugin#installing-compose-on-linux-systems).
|
||||
+ __Windows Server__: If you want to run the Docker daemon and client directly on Microsoft Windows Server, follow the [Windows Server install instructions](compose-plugin#install-compose-on-windows-server).
|
||||
|
||||
|
||||
## Where to go next
|
||||
|
||||
- [User guide](index.md)
|
||||
- [Getting Started](../gettingstarted.md)
|
||||
- [Command line reference](../reference/index.md)
|
||||
- [Compose file reference](../compose-file/index.md)
|
||||
- [Sample apps with Compose](../samples-for-compose.md)
|
|
@ -0,0 +1,58 @@
|
|||
---
|
||||
description: How to uninstall Docker Compose
|
||||
keywords: compose, orchestration, uninstall, uninstallation, docker, documentation
|
||||
|
||||
title: Uninstall Docker Compose
|
||||
---
|
||||
|
||||
|
||||
### Uninstalling Docker Desktop
|
||||
|
||||
If you want to uninstall Compose and you have installed Docker Desktop, follow the corresponding link bellow to get instructions on how to remove Docker Desktop.
|
||||
> Please note that, unless you have other Docker instances installed in that specific environment, you would be removing Docker altogether by uninstalling the Desktop.
|
||||
|
||||
See Uninstall Docker Desktop for:
|
||||
* [Mac](../../desktop/mac/install.md/#uninstall-docker-desktop){:target="_blank" rel="noopener" class="_"}
|
||||
* [Windows](../../desktop/windows/install.md/#uninstall-docker-desktop){:target="_blank" rel="noopener" class="_"}
|
||||
* [Linux](../../desktop/linux/install.md/#uninstall-docker-desktop){:target="_blank" rel="noopener" class="_"}
|
||||
|
||||
|
||||
### Uninstalling Compose CLI plugin
|
||||
|
||||
To remove the Compose CLI plugin, run:
|
||||
|
||||
```console
|
||||
$ sudo apt-get remove docker-compose-plugin
|
||||
```
|
||||
Or, if using a different distro, use the equivalent package manager instruction to remove `docker-compose-plugin`.
|
||||
|
||||
__Manually installed__
|
||||
|
||||
If you used `curl` to install Compose CLI plugin, to uninstall it run:
|
||||
|
||||
```console
|
||||
$ rm $DOCKER_CONFIG/cli-plugins/docker-compose
|
||||
```
|
||||
|
||||
or, if you have installed Compose for all users, run:
|
||||
|
||||
```console
|
||||
$ rm /usr/local/lib/docker/cli-plugins/docker-compose
|
||||
```
|
||||
|
||||
You can also use:
|
||||
|
||||
{% raw %}
|
||||
```console
|
||||
docker info --format '{{range .ClientInfo.Plugins}}{{if eq .Name "compose"}}{{.Path}}{{end}}{{end}}'
|
||||
```
|
||||
{% endraw %}
|
||||
|
||||
to inspect the location of the Compose CLI plugin.
|
||||
|
||||
|
||||
> Got a "Permission denied" error?
|
||||
>
|
||||
> If you get a "Permission denied" error using either of the above
|
||||
> methods, you do not have the permissions allowing you to remove
|
||||
> `docker-compose`. To force the removal, prepend `sudo` to either of the above instructions and run it again.
|
|
@ -68,7 +68,7 @@ commands work with no further configuration.
|
|||
## Compose documentation
|
||||
|
||||
- [User guide](index.md)
|
||||
- [Installing Compose](install.md)
|
||||
- [Installing Compose](install/index.md)
|
||||
- [Getting Started](gettingstarted.md)
|
||||
- [Command line reference](reference/index.md)
|
||||
- [Compose file reference](compose-file/index.md)
|
||||
|
|
|
@ -174,7 +174,7 @@ $ COMPOSE_PROFILES=dev docker-compose up phpmyadmin
|
|||
## Compose documentation
|
||||
|
||||
- [User guide](index.md)
|
||||
- [Installing Compose](install.md)
|
||||
- [Installing Compose](install/index.md)
|
||||
- [Getting Started](gettingstarted.md)
|
||||
- [Command line reference](reference/index.md)
|
||||
- [Compose file reference](compose-file/index.md)
|
||||
|
|
|
@ -141,6 +141,6 @@ python client.
|
|||
## Related information
|
||||
|
||||
- [User guide](../index.md)
|
||||
- [Installing Compose](../install.md)
|
||||
- [Installing Compose](../install/index.md)
|
||||
- [Compose file reference](../compose-file/index.md)
|
||||
- [Environment file](../env-file.md)
|
||||
|
|
|
@ -5,7 +5,7 @@ title: Sample apps with Compose
|
|||
---
|
||||
|
||||
The following samples show the various aspects of how to work with Docker
|
||||
Compose. As a prerequisite, be sure to [install Docker Compose](install.md)
|
||||
Compose. As a prerequisite, be sure to [install Docker Compose](install/index.md)
|
||||
if you have not already done so.
|
||||
|
||||
## Key concepts these samples cover
|
||||
|
|
|
@ -89,7 +89,7 @@ script:
|
|||
## Compose documentation
|
||||
|
||||
- [User guide](index.md)
|
||||
- [Installing Compose](install.md)
|
||||
- [Installing Compose](install/index.md)
|
||||
- [Getting Started](gettingstarted.md)
|
||||
- [Command line reference](reference/index.md)
|
||||
- [Compose file reference](compose-file/index.md)
|
||||
|
|
|
@ -4,7 +4,7 @@ keywords: trust, security, notary, deployment
|
|||
title: Deploy Notary Server with Compose
|
||||
---
|
||||
|
||||
The easiest way to deploy Notary Server is by using Docker Compose. To follow the procedure on this page, you must have already [installed Docker Compose](../../../compose/install.md).
|
||||
The easiest way to deploy Notary Server is by using Docker Compose. To follow the procedure on this page, you must have already [installed Docker Compose](../../../compose/install/index.md).
|
||||
|
||||
1. Clone the Notary repository.
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ This sandbox requires you to install two Docker tools: Docker Engine >= 1.10.0
|
|||
and Docker Compose >= 1.6.0. To install the Docker Engine, choose from the
|
||||
[list of supported platforms](../../install/index.md). To install
|
||||
Docker Compose, see the
|
||||
[detailed instructions here](../../../compose/install.md).
|
||||
[detailed instructions here](../../../compose/install/index.md).
|
||||
|
||||
## What is in the sandbox?
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ To run through this tutorial, you need:
|
|||
> `docker stack` and `docker service` commands must be run from a manager
|
||||
> node.
|
||||
|
||||
2. A current version of [Docker Compose](../../compose/install.md).
|
||||
2. A current version of [Docker Compose](../../compose/install/index.md).
|
||||
|
||||
|
||||
## Set up a Docker registry
|
||||
|
|
|
@ -19,7 +19,7 @@ So, how do we get started?
|
|||
|
||||
If you installed Docker Desktop/Toolbox for either Windows or Mac, you already have Docker Compose!
|
||||
Play-with-Docker instances already have Docker Compose installed as well. If you are on
|
||||
a Linux machine, you will need to [install Docker Compose](../compose/install.md).
|
||||
a Linux machine, you will need to [install Docker Compose](../compose/install/index.md).
|
||||
|
||||
After installation, you should be able to run the following and see version information.
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ Compose to set up and run the sample ASP.NET Core application using the
|
|||
with the
|
||||
[SQL Server on Linux image](https://hub.docker.com/_/microsoft-mssql-server).
|
||||
You just need to have [Docker Engine](../get-docker.md)
|
||||
and [Docker Compose](../compose/install.md) installed on your
|
||||
and [Docker Compose](../compose/install/index.md) installed on your
|
||||
platform of choice: Linux, Mac or Windows.
|
||||
|
||||
For this sample, we create a sample .NET Core Web Application using the
|
||||
|
@ -208,7 +208,7 @@ to try out .NET Framework and more SQL Server tutorials.
|
|||
## More Compose documentation
|
||||
|
||||
- [Docker Compose overview](../compose/index.md)
|
||||
- [Install Docker Compose](../compose/install.md)
|
||||
- [Install Docker Compose](../compose/install/index.md)
|
||||
- [Getting Started with Docker Compose](../compose/gettingstarted.md)
|
||||
- [Docker Compose Command line reference](../compose/reference/index.md)
|
||||
- [Compose file reference](../compose/compose-file/index.md)
|
||||
|
|
|
@ -7,7 +7,7 @@ redirect_from:
|
|||
---
|
||||
|
||||
This quick-start guide demonstrates how to use Docker Compose to set up and run a simple Django/PostgreSQL app. Before starting,
|
||||
[install Compose](../compose/install.md).
|
||||
[install Compose](../compose/install/index.md).
|
||||
|
||||
### Define the project components
|
||||
|
||||
|
@ -286,7 +286,7 @@ In this section, you set up the database connection for Django.
|
|||
## More Compose documentation
|
||||
|
||||
- [Docker Compose overview](../compose/index.md)
|
||||
- [Install Docker Compose](../compose/install.md)
|
||||
- [Install Docker Compose](../compose/install/index.md)
|
||||
- [Getting Started with Docker Compose](../compose/gettingstarted.md)
|
||||
- [Docker Compose Command line reference](../compose/reference/index.md)
|
||||
- [Compose file reference](../compose/compose-file/index.md)
|
||||
|
|
|
@ -7,7 +7,7 @@ redirect_from:
|
|||
---
|
||||
|
||||
This Quickstart guide shows you how to use Docker Compose to set up and run
|
||||
a Rails/PostgreSQL app. Before starting, [install Compose](../compose/install.md).
|
||||
a Rails/PostgreSQL app. Before starting, [install Compose](../compose/install/index.md).
|
||||
|
||||
### Define the project
|
||||
|
||||
|
@ -272,7 +272,7 @@ host.
|
|||
## More Compose documentation
|
||||
|
||||
- [Docker Compose overview](../compose/index.md)
|
||||
- [Install Docker Compose](../compose/install.md)
|
||||
- [Install Docker Compose](../compose/install/index.md)
|
||||
- [Getting Started with Docker Compose](../compose/gettingstarted.md)
|
||||
- [Docker Compose Command line reference](../compose/reference/index.md)
|
||||
- [Compose file reference](../compose/compose-file/index.md)
|
||||
|
|
|
@ -9,7 +9,7 @@ redirect_from:
|
|||
You can use Docker Compose to easily run WordPress in an isolated environment
|
||||
built with Docker containers. This quick-start guide demonstrates how to use
|
||||
Compose to set up and run WordPress. Before starting, make sure you have
|
||||
[Compose installed](../compose/install.md).
|
||||
[Compose installed](../compose/install/index.md).
|
||||
|
||||
### Define the project
|
||||
|
||||
|
@ -144,7 +144,7 @@ network, and the WordPress database.
|
|||
## More Compose documentation
|
||||
|
||||
- [Docker Compose overview](../compose/index.md)
|
||||
- [Install Docker Compose](../compose/install.md)
|
||||
- [Install Docker Compose](../compose/install/index.md)
|
||||
- [Getting Started with Docker Compose](../compose/gettingstarted.md)
|
||||
- [Docker Compose Command line reference](../compose/reference/index.md)
|
||||
- [Compose file reference](../compose/compose-file/index.md)
|
||||
|
|
Loading…
Reference in New Issue