ENGDOCS-2341 (#21556)

<!--Delete sections as needed -->

## Description

Compose freshness

## Related issues or tickets

<!-- Related issues, pull requests, or Jira tickets -->

## Reviews

<!-- Notes for reviewers here -->
<!-- List applicable reviews (optionally @tag reviewers) -->

- [ ] Technical review
- [ ] Editorial review
- [ ] Product review
This commit is contained in:
Allie Sadler 2024-12-04 08:40:22 +00:00 committed by GitHub
parent ff09b52268
commit 0c71c3b245
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 126 additions and 101 deletions

View File

@ -113,6 +113,7 @@ Zsh
[Nn]amespace
[Oo]nboarding
[Pp]aravirtualization
[Pp]repend
[Pp]rocfs
[Pp]roxied
[Pp]roxying

View File

@ -13,15 +13,14 @@ Compose already comes with pre-defined environment variables. It also inherits c
This page contains information on how you can set or change the following pre-defined environment variables if you need to:
- `COMPOSE_CONVERT_WINDOWS_PATHS`
- `COMPOSE_PROJECT_NAME`
- `COMPOSE_FILE`
- `COMPOSE_PROFILES`
- `COMPOSE_PROJECT_NAME`
- `DOCKER_CERT_PATH`
- `COMPOSE_PARALLEL_LIMIT`
- `COMPOSE_CONVERT_WINDOWS_PATHS`
- `COMPOSE_PATH_SEPARATOR`
- `COMPOSE_IGNORE_ORPHANS`
- `COMPOSE_REMOVE_ORPHANS`
- `COMPOSE_PATH_SEPARATOR`
- `COMPOSE_PARALLEL_LIMIT`
- `COMPOSE_ANSI`
- `COMPOSE_STATUS_STDOUT`
- `COMPOSE_ENV_FILES`
@ -68,29 +67,35 @@ See also the [command-line options overview](/reference/cli/docker/compose/_inde
Specifies the path to a Compose file. Specifying multiple Compose files is supported.
- Default behavior: If not provided, Compose looks for a file named `compose.yaml` or `docker-compose.yaml` in the current directory and, if not found, then Compose searches each parent directory recursively until a file by that name is found.
- Default separator: When specifying multiple Compose files, the path separators are, by default, on:
* Mac and Linux: `:` (colon),
* Windows: `;` (semicolon).
- Default behavior: If not provided, Compose looks for a file named `compose.yaml` in the current directory and, if not found, then Compose searches each parent directory recursively until a file by that name is found.
- When specifying multiple Compose files, the path separators are, by default, on:
- Mac and Linux: `:` (colon)
- Windows: `;` (semicolon)
For example:
The path separator can also be customized using `COMPOSE_PATH_SEPARATOR`.
Example: `COMPOSE_FILE=docker-compose.yml:docker-compose.prod.yml`.
```console
COMPOSE_FILE=docker-compose.yml:docker-compose.prod.yml
```
The path separator can also be customized using [`COMPOSE_PATH_SEPARATOR`](#compose_path_separator).
See also the [command-line options overview](/reference/cli/docker/compose/_index.md#command-options-overview-and-help) and [using `-f` to specify name and path of one or more Compose files](/reference/cli/docker/compose/_index.md#use--f-to-specify-name-and-path-of-one-or-more-compose-files).
### COMPOSE\_PROFILES
Specifies one or more profiles to be enabled on `compose up` execution.
Specifies one or more profiles to be enabled when `docker compose up` is run.
Services with matching profiles are started as well as any services for which no profile has been defined.
For example, calling `docker compose up`with `COMPOSE_PROFILES=frontend` selects services with the
`frontend` profile as well as any services without a profile specified.
* Default separator: specify a list of profiles using a comma as separator.
If specifying multiple profiles, use a comma as a separator.
Example: `COMPOSE_PROFILES=frontend,debug`
This example enables all services matching both the `frontend` and `debug` profiles and services without a profile.
This following example enables all services matching both the `frontend` and `debug` profiles and services without a profile.
```console
COMPOSE_PROFILES=frontend,debug
```
See also [Using profiles with Compose](../profiles.md) and the [`--profile` command-line option](/reference/cli/docker/compose/_index.md#use---profile-to-specify-one-or-more-active-profiles).
@ -98,27 +103,36 @@ See also [Using profiles with Compose](../profiles.md) and the [`--profile` comm
When enabled, Compose performs path conversion from Windows-style to Unix-style in volume definitions.
* Supported values:
* `true` or `1`, to enable,
* `false` or `0`, to disable.
* Defaults to: `0`.
- Supported values:
- `true` or `1`, to enable
- `false` or `0`, to disable
- Defaults to: `0`
### COMPOSE\_PATH\_SEPARATOR
Specifies a different path separator for items listed in `COMPOSE_FILE`.
* Defaults to:
* On macOS and Linux to `:`,
* On Windows to`;`.
- Defaults to:
- On macOS and Linux to `:`
- On Windows to`;`
### COMPOSE\_IGNORE\_ORPHANS
When enabled, Compose doesn't try to detect orphaned containers for the project.
* Supported values:
* `true` or `1`, to enable,
* `false` or `0`, to disable.
* Defaults to: `0`.
- Supported values:
- `true` or `1`, to enable
- `false` or `0`, to disable
- Defaults to: `0`
### COMPOSE\_REMOVE\_ORPHANS
When enabled, Compose automatically removes orphaned containers when updating a service or stack. Orphaned containers are those that were created by a previous configuration but are no longer defined in the current `compose.yaml` file.
- Supported values:
- `true` or `1`, to enable automatic removal of orphaned containers
- `false` or `0`, to disable automatic removal. Compose displays a warning about orphaned containers instead.
- Defaults to: `0`
### COMPOSE\_PARALLEL\_LIMIT
@ -128,27 +142,27 @@ Specifies the maximum level of parallelism for concurrent engine calls.
Specifies when to print ANSI control characters.
* Supported values:
* `auto`, Compose detects if TTY mode can be used. Otherwise, use plain text mode.
* `never`, use plain text mode.
* `always` or `0`, use TTY mode.
* Defaults to: `auto`.
- Supported values:
- `auto`, Compose detects if TTY mode can be used. Otherwise, use plain text mode
- `never`, use plain text mode
- `always` or `0`, use TTY mode
- Defaults to: `auto`
### COMPOSE\_STATUS\_STDOUT
When enabled, Compose writes its internal status and progress messages to `stdout` instead of `stderr`.
The default value is false to clearly separate the output streams between Compose messages and your container's logs.
* Supported values:
* `true` or `1`, to enable,
* `false` or `0`, to disable.
* Defaults to: `0`.
- Supported values:
- `true` or `1`, to enable
- `false` or `0`, to disable
- Defaults to: `0`
### COMPOSE\_ENV\_FILES
Lets you specify which environment files Compose should use if `--env-file` isn't used.
When using multiple environment files, use a comma as a separator. For example,
When using multiple environment files, use a comma as a separator. For example:
```console
COMPOSE_ENV_FILES=.env.envfile1, .env.envfile2
@ -158,25 +172,25 @@ If `COMPOSE_ENV_FILES` is not set, and you don't provide `--env-file` in the CLI
### COMPOSE\_MENU
> Available in Docker Compose version [2.26.0](/manuals/compose/releases/release-notes.md#2260) and later, and Docker Desktop version 4.29 and later.
{{< introduced compose 2.26.0 "/manuals/compose/releases/release-notes.md#2260" >}}
When enabled, Compose displays a navigation menu where you can choose to open the Compose stack in Docker Desktop, switch on [`watch` mode](../file-watch.md), or use [Docker Debug](/reference/cli/docker/debug.md).
* Supported values:
* `true` or `1`, to enable,
* `false` or `0`, to disable.
* Defaults to: `1` if you obtained Docker Compose through Docker Desktop, otherwise default is `0`.
- Supported values:
- `true` or `1`, to enable
- `false` or `0`, to disable
- Defaults to: `1` if you obtained Docker Compose through Docker Desktop, otherwise default is `0`
### COMPOSE\_EXPERIMENTAL
> Available in Docker Compose version [2.26.0](/manuals/compose/releases/release-notes.md#2260) and later, and Docker Desktop version 4.29 and later.
{{< introduced compose 2.26.0 "/manuals/compose/releases/release-notes.md#2260" >}}
This is an opt-out variable. When turned off it deactivates the experimental features such as the navigation menu or [Synchronized file shares](/manuals/desktop/features/synchronized-file-sharing.md).
* Supported values:
* `true` or `1`, to enable,
* `false` or `0`, to disable.
* Defaults to: `1`.
- Supported values:
- `true` or `1`, to enable
- `false` or `0`, to disable
- Defaults to: `1`
## Unsupported in Compose V2

View File

@ -43,20 +43,21 @@ If you have already installed Docker Desktop, you can check which version of Com
> ```
> Or enable [Automatically check configuration](/manuals/desktop/settings-and-maintenance/settings.md) which will detect and fix it for you.
### Scenario two: Install the Compose plugin
If you already have Docker Engine and Docker CLI installed, you can install the Compose plugin from the command line, by either:
- [Using Docker's repository](linux.md#install-using-the-repository)
- [Downloading and installing manually](linux.md#install-the-plugin-manually)
### Scenario two: Install the Docker Compose plugin
> [!IMPORTANT]
>
>This is only available on Linux
> This install scenario is only available on Linux.
### Scenario three: Install the Compose standalone
If you already have Docker Engine and Docker CLI installed, you can install the Docker Compose plugin from the command line, by either:
- [Using Docker's repository](linux.md#install-using-the-repository)
- [Downloading and installing manually](linux.md#install-the-plugin-manually)
You can [install the Compose standalone](standalone.md) on Linux or on Windows Server.
### Scenario three: Install the Docker Compose standalone
> [!WARNING]
>
>This install scenario is not recommended and is only supported for backward compatibility purposes.
> This install scenario is not recommended and is only supported for backward compatibility purposes.
You can [install the Docker Compose standalone](standalone.md) on Linux or on Windows Server.

View File

@ -6,22 +6,23 @@ keywords: install docker compose linux, docker compose linux, docker compose plu
linux install docker-compose, linux docker compose, docker compose v2 linux, install
docker compose on linux
toc_max: 3
title: Install the Compose plugin
title: Install the Docker Compose plugin
linkTitle: Plugin
aliases:
- /compose/compose-plugin/
- /compose/compose-linux/
weight: 10
---
On this page you can find instructions on how to install the Compose plugin on Linux from the command line.
This page contains instructions on how to install the Docker Compose plugin on Linux from the command line.
To install the Compose plugin on Linux, you can either:
To install the Docker Compose plugin on Linux, you can either:
- [Set up Docker's repository on your Linux system](#install-using-the-repository).
- [Install Compose manually](#install-the-plugin-manually).
- [Install manually](#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.
For Compose standalone, see [Install Compose Standalone](standalone.md).
> These instructions assume you already have Docker Engine and Docker CLI installed and now want to install the Docker Compose plugin. For the Docker Compose standalone, see [Install the Docker Compose Standalone](standalone.md).
## Install using the repository
@ -64,9 +65,9 @@ For Compose standalone, see [Install Compose Standalone](standalone.md).
Where `vN.N.N` is placeholder text standing in for the latest version.
### Update Compose
### Update Docker Compose
To update the Compose plugin, run the following commands:
To update the Docker Compose plugin, run the following commands:
* For Ubuntu and Debian, run:
@ -85,9 +86,9 @@ To update the Compose plugin, run the following commands:
> [!NOTE]
>
> This option requires you to manage upgrades manually. We recommend setting up Docker's repository for easier maintenance.
> This option requires you to manage upgrades manually. It is recommended that you set up Docker's repository for easier maintenance.
1. To download and install the Compose CLI plugin, run:
1. To download and install the Docker Compose CLI plugin, run:
```console
$ DOCKER_CONFIG=${DOCKER_CONFIG:-$HOME/.docker}
@ -95,11 +96,11 @@ To update the Compose plugin, run the following commands:
$ curl -SL https://github.com/docker/compose/releases/download/{{% param "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.
This command downloads and installs the latest release of Docker 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 `{{% param "compose_version" %}}` with the version of Compose you want to use.
- 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 `{{% param "compose_version" %}}` with the version of Compose you want to use.
- For a different architecture, substitute `x86_64` with the [architecture you want](https://github.com/docker/compose/releases).

View File

@ -1,57 +1,66 @@
---
title: Install Compose standalone
title: Install the Docker Compose standalone
linkTitle: Standalone
description: How to install Docker Compose - Other Scenarios
keywords: compose, orchestration, install, installation, docker, documentation
toc_max: 3
weight: 20
---
On this page you can find instructions on how to install Compose standalone on Linux or Windows Server, from the command line.
### On Linux
This page contains instructions on how to install Docker Compose standalone on Linux or Windows Server, from the command line.
> [!WARNING]
>
> Note that Compose standalone uses the `-compose` syntax instead of the current standard syntax `compose`.
>For example type `docker-compose up` when using Compose standalone, instead of `docker compose up`.
> The Docker Compose standalone uses the `-compose` syntax instead of the current standard syntax `compose`.
> For example, you must type `docker-compose up` when using Docker Compose standalone, instead of `docker compose up`.
## On Linux
1. To download and install the Docker Compose standalone, run:
1. To download and install Compose standalone, run:
```console
$ curl -SL https://github.com/docker/compose/releases/download/{{% param "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.
```console
$ chmod +x /usr/local/bin/docker-compose
```
3. Test and execute Compose commands using `docker-compose`.
> [!TIP]
>
> 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 and execute Docker Compose commands using `docker-compose`.
### On Windows Server
> [!TIP]
>
> 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
> ```
Follow these instructions if you are running the Docker daemon and client directly
on Microsoft Windows Server and want to install Docker Compose.
## On Windows Server
Follow these instructions if you are [running the Docker daemon directly
on Microsoft Windows Server](/manuals/engine/install/binaries.md#install-server-and-client-binaries-on-windows) and want to install Docker Compose.
1. Run PowerShell as an administrator.
When asked if you want to allow this app to make changes to your device, select **Yes** in order to proceed with the installation.
In order to proceed with the installation, select **Yes** when asked if you want this app to make changes to your device.
2. GitHub now requires TLS1.2. In PowerShell, run the following:
2. Optional. Ensure TLS1.2 is enabled.
GitHub requires TLS1.2 fore secure connections. If youre using an older version of Windows Server, for example 2016, or suspect that TLS1.2 is not enabled, run the following command in PowerShell:
```powershell
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
```
3. Run the following command to download the latest release of Compose ({{% param "compose_version" %}}):
3. Download the latest release of Docker Compose ({{% param "compose_version" %}}). Run the following command:
```powershell
Start-BitsTransfer -Source "https://github.com/docker/compose/releases/download/{{% param "compose_version" %}}/docker-compose-windows-x86_64.exe" -Destination $Env:ProgramFiles\Docker\docker-compose.exe
```
To install a different version of Compose, substitute `{{% param "compose_version" %}}` with the version of Compose you want to use.
To install a different version of Docker Compose, substitute `{{% param "compose_version" %}}` with the version of Compose you want to use.
> [!NOTE]
>

View File

@ -9,15 +9,15 @@ Uninstalling Docker Compose depends on the method you have used to install Docke
## Uninstalling Docker Desktop
If you want to uninstall Compose and you have installed Docker Desktop, see [Uninstall Docker Desktop](/manuals/desktop/uninstall.md).
If you want to uninstall Docker Compose and you have installed Docker Desktop, see [Uninstall Docker Desktop](/manuals/desktop/uninstall.md).
> [!NOTE]
>
> Unless you have other Docker instances installed on that specific environment, you would be removing Docker altogether by uninstalling the Desktop.
> Unless you have other Docker instances installed on that specific environment, you would be removing Docker altogether by uninstalling Docker Desktop.
## Uninstalling the Docker Compose CLI plugin
To remove the Compose CLI plugin, run:
To remove the Docker Compose CLI plugin, run:
Ubuntu, Debian:
@ -32,7 +32,7 @@ RPM-based distributions:
### Manually installed
If you used `curl` to install Compose CLI plugin, to uninstall it, run:
If you used `curl` to install Docker Compose CLI plugin, to uninstall it, run:
```console
$ rm $DOCKER_CONFIG/cli-plugins/docker-compose
@ -40,7 +40,7 @@ If you used `curl` to install Compose CLI plugin, to uninstall it, run:
### Remove for all users
Or, if you have installed Compose for all users, run:
Or, if you have installed Docker Compose for all users, run:
```console
$ rm /usr/local/lib/docker/cli-plugins/docker-compose
@ -48,15 +48,14 @@ Or, if you have installed Compose for all users, run:
> [!NOTE]
>
> 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.
> If you get a **Permission denied** error using either of the previous
> methods, you do not have the permissions needed to remove
> Docker Compose. To force the removal, prepend `sudo` to either of the previous instructions and run it again.
### Inspect the location of the Compose CLI plugin
To check where Compose is installed, use:
```console
$ docker info --format '{{range .ClientInfo.Plugins}}{{if eq .Name "compose"}}{{.Path}}{{end}}{{end}}'
```