You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/manuals/compose/how-tos/environment-variables/envvars.md
+57-43Lines changed: 57 additions & 43 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,15 +13,14 @@ Compose already comes with pre-defined environment variables. It also inherits c
13
13
14
14
This page contains information on how you can set or change the following pre-defined environment variables if you need to:
15
15
16
-
-`COMPOSE_CONVERT_WINDOWS_PATHS`
16
+
-`COMPOSE_PROJECT_NAME`
17
17
-`COMPOSE_FILE`
18
18
-`COMPOSE_PROFILES`
19
-
-`COMPOSE_PROJECT_NAME`
20
-
-`DOCKER_CERT_PATH`
21
-
-`COMPOSE_PARALLEL_LIMIT`
19
+
-`COMPOSE_CONVERT_WINDOWS_PATHS`
20
+
-`COMPOSE_PATH_SEPARATOR`
22
21
-`COMPOSE_IGNORE_ORPHANS`
23
22
-`COMPOSE_REMOVE_ORPHANS`
24
-
-`COMPOSE_PATH_SEPARATOR`
23
+
-`COMPOSE_PARALLEL_LIMIT`
25
24
-`COMPOSE_ANSI`
26
25
-`COMPOSE_STATUS_STDOUT`
27
26
-`COMPOSE_ENV_FILES`
@@ -69,56 +68,71 @@ See also the [command-line options overview](/reference/cli/docker/compose/_inde
69
68
Specifies the path to a Compose file. Specifying multiple Compose files is supported.
70
69
71
70
- 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.
72
-
- Default separator: When specifying multiple Compose files, the path separators are, by default, on:
73
-
* Mac and Linux: `:` (colon),
74
-
* Windows: `;` (semicolon).
75
-
76
-
The path separator can also be customized using `COMPOSE_PATH_SEPARATOR`.
71
+
- When specifying multiple Compose files, the path separators are, by default, on:
The path separator can also be customized using [`COMPOSE_PATH_SEPARATOR`](#compose_path_separator).
79
80
80
81
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).
81
82
82
83
### COMPOSE\_PROFILES
83
84
84
-
Specifies one or more profiles to be enabled on `compose up` execution.
85
+
Specifies one or more profiles to be enabled when `docker compose up` is run.
86
+
85
87
Services with matching profiles are started as well as any services for which no profile has been defined.
86
88
87
89
For example, calling `docker compose up`with `COMPOSE_PROFILES=frontend` selects services with the
88
90
`frontend` profile as well as any services without a profile specified.
89
91
90
-
* Default separator: specify a list of profiles using a comma as separator.
92
+
If specifying multiple profiles, use a comma as separator.
93
+
94
+
This following example enables all services matching both the `frontend` and `debug` profiles and services without a profile.
91
95
92
-
Example: `COMPOSE_PROFILES=frontend,debug`
93
-
This example enables all services matching both the `frontend` and `debug` profiles and services without a profile.
96
+
```console
97
+
COMPOSE_PROFILES=frontend,debug
98
+
```
94
99
95
100
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).
96
101
97
102
### COMPOSE\_CONVERT\_WINDOWS\_PATHS
98
103
99
104
When enabled, Compose performs path conversion from Windows-style to Unix-style in volume definitions.
100
105
101
-
* Supported values:
102
-
*`true` or `1`, to enable,
103
-
*`false` or `0`, to disable.
104
-
* Defaults to: `0`.
106
+
- Supported values:
107
+
-`true` or `1`, to enable
108
+
-`false` or `0`, to disable
109
+
- Defaults to: `0`
105
110
106
111
### COMPOSE\_PATH\_SEPARATOR
107
112
108
113
Specifies a different path separator for items listed in `COMPOSE_FILE`.
109
114
110
-
* Defaults to:
111
-
* On macOS and Linux to `:`,
112
-
* On Windows to`;`.
115
+
- Defaults to:
116
+
- On macOS and Linux to `:`
117
+
- On Windows to`;`
113
118
114
119
### COMPOSE\_IGNORE\_ORPHANS
115
120
116
121
When enabled, Compose doesn't try to detect orphaned containers for the project.
117
122
118
123
* Supported values:
119
-
*`true` or `1`, to enable,
120
-
*`false` or `0`, to disable.
121
-
* Defaults to: `0`.
124
+
*`true` or `1`, to enable
125
+
*`false` or `0`, to disable
126
+
* Defaults to: `0`
127
+
128
+
### COMPOSE\_REMOVE\_ORPHANS
129
+
130
+
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.yml` file.
131
+
132
+
- Supported values:
133
+
-`true` or `1`, to enable automatic removal of orphaned containers
134
+
-`false` or `0`, to disable automatic removal. Compose displays a warning about orphaned containers instead
135
+
- Defaults to: `0`
122
136
123
137
### COMPOSE\_PARALLEL\_LIMIT
124
138
@@ -128,27 +142,27 @@ Specifies the maximum level of parallelism for concurrent engine calls.
128
142
129
143
Specifies when to print ANSI control characters.
130
144
131
-
* Supported values:
132
-
*`auto`, Compose detects if TTY mode can be used. Otherwise, use plain text mode.
133
-
*`never`, use plain text mode.
134
-
*`always` or `0`, use TTY mode.
135
-
* Defaults to: `auto`.
145
+
- Supported values:
146
+
-`auto`, Compose detects if TTY mode can be used. Otherwise, use plain text mode
147
+
-`never`, use plain text mode
148
+
-`always` or `0`, use TTY mode
149
+
- Defaults to: `auto`
136
150
137
151
### COMPOSE\_STATUS\_STDOUT
138
152
139
153
When enabled, Compose writes its internal status and progress messages to `stdout` instead of `stderr`.
140
154
The default value is false to clearly separate the output streams between Compose messages and your container's logs.
141
155
142
-
* Supported values:
143
-
*`true` or `1`, to enable,
144
-
*`false` or `0`, to disable.
145
-
* Defaults to: `0`.
156
+
- Supported values:
157
+
-`true` or `1`, to enable
158
+
-`false` or `0`, to disable
159
+
- Defaults to: `0`
146
160
147
161
### COMPOSE\_ENV\_FILES
148
162
149
163
Lets you specify which environment files Compose should use if `--env-file` isn't used.
150
164
151
-
When using multiple environment files, use a comma as a separator. For example,
165
+
When using multiple environment files, use a comma as a separator. For example:
152
166
153
167
```console
154
168
COMPOSE_ENV_FILES=.env.envfile1, .env.envfile2
@@ -162,21 +176,21 @@ If `COMPOSE_ENV_FILES` is not set, and you don't provide `--env-file` in the CLI
162
176
163
177
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).
164
178
165
-
* Supported values:
166
-
*`true` or `1`, to enable,
167
-
*`false` or `0`, to disable.
168
-
* Defaults to: `1` if you obtained Docker Compose through Docker Desktop, otherwise default is `0`.
179
+
- Supported values:
180
+
-`true` or `1`, to enable
181
+
-`false` or `0`, to disable
182
+
- Defaults to: `1` if you obtained Docker Compose through Docker Desktop, otherwise default is `0`
169
183
170
184
### COMPOSE\_EXPERIMENTAL
171
185
172
186
> 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.
173
187
174
188
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).
> These instructions assume you already have Docker Engine and Docker CLI installed and now want to install the Compose plugin.
24
-
For Compose standalone, see [Install Compose Standalone](standalone.md).
25
+
> 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).
25
26
26
27
## Install using the repository
27
28
@@ -64,9 +65,9 @@ For Compose standalone, see [Install Compose Standalone](standalone.md).
64
65
65
66
Where `vN.N.N` is placeholder text standing in for the latest version.
66
67
67
-
### Update Compose
68
+
### Update Docker Compose
68
69
69
-
To update the Compose plugin, run the following commands:
70
+
To update the Docker Compose plugin, run the following commands:
70
71
71
72
* For Ubuntu and Debian, run:
72
73
@@ -85,21 +86,21 @@ To update the Compose plugin, run the following commands:
85
86
86
87
> [!NOTE]
87
88
>
88
-
> This option requires you to manage upgrades manually. We recommend setting up Docker's repository for easier maintenance.
89
+
> This option requires you to manage upgrades manually. It is recommended that you set up Docker's repository for easier maintenance.
89
90
90
-
1. To download and install the Compose CLI plugin, run:
91
+
1. To download and install the Docker Compose CLI plugin, run:
This command downloads the latest release of Docker Compose (from the Compose releases repository) and installs Compose for the active user under `$HOME` directory.
99
+
This command downloads and installs the latest release of Docker Compose for the active user under `$HOME` directory.
99
100
100
101
To install:
101
-
* Docker Compose for _all users_ on your system, replace `~/.docker/cli-plugins` with `/usr/local/lib/docker/cli-plugins`.
102
-
* A different version of Compose, substitute `{{% param "compose_version" %}}` with the version of Compose you want to use.
102
+
- Docker Compose for _all users_ on your system, replace `~/.docker/cli-plugins` with `/usr/local/lib/docker/cli-plugins`.
103
+
- A different version of Compose, substitute `{{% param "compose_version" %}}` with the version of Compose you want to use.
103
104
- For a different architecture, substitute `x86_64` with the [architecture you want](https://github.com/docker/compose/releases).
Follow these instructions if you are running the Docker daemon and client directly
39
-
on Microsoft Windows Server and want to install Docker Compose.
44
+
Follow these instructions if you are [running the Docker daemon directly
45
+
on Microsoft Windows Server](/manuals/engine/install/binaries.md#install-server-and-client-binaries-on-windows) and want to install Docker Compose.
40
46
41
47
1. Run PowerShell as an administrator.
42
-
When asked if you want to allow this app to make changes to your device, select **Yes** in order to proceed with the installation.
48
+
In order to proceed with the installation, select **Yes** when asked if you want this app to make changes to your device.
43
49
44
-
2. GitHub now requires TLS1.2. In PowerShell, run the following:
50
+
2. Optional. Ensure TLS1.2 is enabled.
51
+
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:
0 commit comments