Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions _vale/config/vocabularies/Docker/accept.txt
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ Zsh
[Nn]amespace
[Oo]nboarding
[Pp]aravirtualization
[Pp]repend
[Pp]rocfs
[Pp]roxied
[Pp]roxying
Expand Down
108 changes: 61 additions & 47 deletions content/manuals/compose/how-tos/environment-variables/envvars.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,14 @@

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`
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just reorganised this list to match the RH TOC

- `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`
Expand Down Expand Up @@ -68,57 +67,72 @@

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

Check warning on line 77 in content/manuals/compose/how-tos/environment-variables/envvars.md

View workflow job for this annotation

GitHub Actions / vale

[vale] reported by reviewdog 🐶 [Docker.HeadingSentenceCase] Use sentence case for headings: 'COMPOSE_FILE'. Raw Output: {"message": "[Docker.HeadingSentenceCase] Use sentence case for headings: 'COMPOSE_FILE'.", "location": {"path": "content/manuals/compose/how-tos/environment-variables/envvars.md", "range": {"start": {"line": 77, "column": 7}}}, "severity": "WARNING"}
```
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).

### COMPOSE\_CONVERT\_WINDOWS\_PATHS

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

Expand All @@ -128,27 +142,27 @@

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
Expand All @@ -158,25 +172,25 @@

### 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

Expand Down
19 changes: 10 additions & 9 deletions content/manuals/compose/install/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

27 changes: 14 additions & 13 deletions content/manuals/compose/install/linux.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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:

Expand All @@ -85,21 +86,21 @@ 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}
$ mkdir -p $DOCKER_CONFIG/cli-plugins
$ 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).


Expand Down
55 changes: 32 additions & 23 deletions content/manuals/compose/install/standalone.md
Original file line number Diff line number Diff line change
@@ -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
> ```

## 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.
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 you’re 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]
>
Expand Down
Loading