Skip to content

Commit 4693262

Browse files
authored
Merge pull request #22135 from scop/docs/manuals-compose-yaml
docs(manuals): use canonical compose.yaml filename
1 parent ae3eec2 commit 4693262

File tree

19 files changed

+39
-39
lines changed

19 files changed

+39
-39
lines changed

content/manuals/build/bake/compose-file.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Bake supports the [Compose file format](/reference/compose-file/_index.md)
1010
to parse a Compose file and translate each service to a [target](reference.md#target).
1111

1212
```yaml
13-
# docker-compose.yml
13+
# compose.yaml
1414
services:
1515
webapp-dev:
1616
build: &build-dev
@@ -106,7 +106,7 @@ where the command is executed and applied to compose definitions passed
106106
with `-f`.
107107

108108
```yaml
109-
# docker-compose.yml
109+
# compose.yaml
110110
services:
111111
webapp:
112112
image: docker.io/username/webapp:${TAG:-v1.0.0}
@@ -152,7 +152,7 @@ the [special extension](/reference/compose-file/extension.md) field
152152
`x-bake` in your compose file to evaluate extra fields:
153153

154154
```yaml
155-
# docker-compose.yml
155+
# compose.yaml
156156
services:
157157
addon:
158158
image: ct-addon:bar

content/manuals/compose/how-tos/environment-variables/envvars-precedence.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ In the following example, a different value for the same environment variable in
3030
$ cat ./webapp.env
3131
NODE_ENV=test
3232

33-
$ cat compose.yml
33+
$ cat compose.yaml
3434
services:
3535
webapp:
3636
image: 'webapp'

content/manuals/compose/how-tos/environment-variables/envvars.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ Specifies the path to a Compose file. Specifying multiple Compose files is suppo
7474
For example:
7575

7676
```console
77-
COMPOSE_FILE=docker-compose.yml:docker-compose.prod.yml
77+
COMPOSE_FILE=compose.yaml:compose.prod.yaml
7878
```
7979
The path separator can also be customized using [`COMPOSE_PATH_SEPARATOR`](#compose_path_separator).
8080

content/manuals/compose/how-tos/environment-variables/set-environment-variables.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ A container's environment is not set until there's an explicit entry in the serv
2020
## Use the `environment` attribute
2121

2222
You can set environment variables directly in your container's environment with the
23-
[`environment` attribute](/reference/compose-file/services.md#environment) in your `compose.yml`.
23+
[`environment` attribute](/reference/compose-file/services.md#environment) in your `compose.yaml`.
2424

2525
It supports both list and mapping syntax:
2626

@@ -74,7 +74,7 @@ It can also help you keep your environment variables separate from your main con
7474

7575
The [`env_file` attribute](/reference/compose-file/services.md#env_file) also lets you use multiple `.env` files in your Compose application.
7676

77-
The paths to your `.env` file, specified in the `env_file` attribute, are relative to the location of your `compose.yml` file.
77+
The paths to your `.env` file, specified in the `env_file` attribute, are relative to the location of your `compose.yaml` file.
7878

7979
> [!IMPORTANT]
8080
>

content/manuals/compose/how-tos/environment-variables/variable-interpolation.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Below is a simple example:
2121
```console
2222
$ cat .env
2323
TAG=v1.5
24-
$ cat compose.yml
24+
$ cat compose.yaml
2525
services:
2626
web:
2727
image: "webapp:${TAG}"
@@ -98,7 +98,7 @@ services:
9898

9999
#### Additional information
100100

101-
- If you define a variable in your `.env` file, you can reference it directly in your `compose.yml` with the [`environment` attribute](/reference/compose-file/services.md#environment). For example, if your `.env` file contains the environment variable `DEBUG=1` and your `compose.yml` file looks like this:
101+
- If you define a variable in your `.env` file, you can reference it directly in your `compose.yaml` with the [`environment` attribute](/reference/compose-file/services.md#environment). For example, if your `.env` file contains the environment variable `DEBUG=1` and your `compose.yaml` file looks like this:
102102
```yaml
103103
services:
104104
webapp:
@@ -163,14 +163,14 @@ $ docker compose --env-file ./config/.env.dev up
163163

164164
#### Additional information
165165

166-
- This method is useful if you want to temporarily override an `.env` file that is already referenced in your `compose.yml` file. For example you may have different `.env` files for production ( `.env.prod`) and testing (`.env.test`).
166+
- This method is useful if you want to temporarily override an `.env` file that is already referenced in your `compose.yaml` file. For example you may have different `.env` files for production ( `.env.prod`) and testing (`.env.test`).
167167
In the following example, there are two environment files, `.env` and `.env.dev`. Both have different values set for `TAG`.
168168
```console
169169
$ cat .env
170170
TAG=v1.5
171171
$ cat ./config/.env.dev
172172
TAG=v1.6
173-
$ cat compose.yml
173+
$ cat compose.yaml
174174
services:
175175
web:
176176
image: "webapp:${TAG}"

content/manuals/compose/how-tos/gpu-support.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ You can use either `docker-compose` or `docker compose` commands. For more infor
1515

1616
## Enabling GPU access to service containers
1717

18-
GPUs are referenced in a `compose.yml` file using the [device](/reference/compose-file/deploy.md#devices) attribute from the Compose Deploy specification, within your services that need them.
18+
GPUs are referenced in a `compose.yaml` file using the [device](/reference/compose-file/deploy.md#devices) attribute from the Compose Deploy specification, within your services that need them.
1919

2020
This provides more granular control over a GPU reservation as custom values can be set for the following device properties:
2121

content/manuals/compose/how-tos/multiple-compose-files/extends.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ services:
5959
- "/data"
6060
```
6161
You get exactly the same result as if you wrote
62-
`docker-compose.yml` with the same `build`, `ports`, and `volumes` configuration
62+
`compose.yaml` with the same `build`, `ports`, and `volumes` configuration
6363
values defined directly under `web`.
6464

6565
To include the service `webapp` in the final project when extending services from another file, you need to explicitly include both services in your current Compose file. For example (note this is a non-normative example):
@@ -133,7 +133,7 @@ services:
133133
cpu_shares: 5
134134
```
135135

136-
The `docker-compose.yaml` defines the concrete services which use the common
136+
The `compose.yaml` defines the concrete services which use the common
137137
configuration:
138138

139139
```yaml

content/manuals/compose/how-tos/networking.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ other containers on that network, and discoverable by the service's name.
2222
> project name with either the [`--project-name` flag](/reference/cli/docker/compose.md)
2323
> or the [`COMPOSE_PROJECT_NAME` environment variable](environment-variables/envvars.md#compose_project_name).
2424
25-
For example, suppose your app is in a directory called `myapp`, and your `compose.yml` looks like this:
25+
For example, suppose your app is in a directory called `myapp`, and your `compose.yaml` looks like this:
2626

2727
```yaml
2828
services:

content/manuals/compose/how-tos/production.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,15 @@ production. These changes might include:
2929
- Adding extra services such as a log aggregator
3030

3131
For this reason, consider defining an additional Compose file, for example
32-
`production.yml`, which specifies production-appropriate
32+
`compose.production.yaml`, which specifies production-appropriate
3333
configuration. This configuration file only needs to include the changes you want to make from the original Compose file. The additional Compose file
34-
is then applied over the original `compose.yml` to create a new configuration.
34+
is then applied over the original `compose.yaml` to create a new configuration.
3535

3636
Once you have a second configuration file, you can use it with the
3737
`-f` option:
3838

3939
```console
40-
$ docker compose -f compose.yml -f production.yml up -d
40+
$ docker compose -f compose.yaml -f compose.production.yaml up -d
4141
```
4242

4343
See [Using multiple compose files](multiple-compose-files/_index.md) for a more complete example, and other options.

content/manuals/compose/how-tos/profiles.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ $ COMPOSE_PROFILES=debug docker compose up
6161
```
6262

6363
Both commands start the services with the `debug` profile enabled.
64-
In the previous `compose.yml` file, this starts the services
64+
In the previous `compose.yaml` file, this starts the services
6565
`db`, `backend` and `phpmyadmin`.
6666

6767
### Start multiple profiles
@@ -187,7 +187,7 @@ $ docker compose --profile debug down
187187
$ COMPOSE_PROFILES=debug docker compose down
188188
```
189189

190-
Both commands stop and remove services with the `debug` profile. In the following `compose.yml` file, this stops the services `db` and `phpmyadmin`.
190+
Both commands stop and remove services with the `debug` profile. In the following `compose.yaml` file, this stops the services `db` and `phpmyadmin`.
191191

192192
```yaml
193193
services:

content/manuals/compose/intro/history.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ It also provides a quick snapshot of the differences in file formats, command-li
2424
### Docker Compose CLI versioning
2525

2626
Version one of the Docker Compose command-line binary was first released in 2014. It was written in Python, and is invoked with `docker-compose`.
27-
Typically, Compose V1 projects include a top-level `version` element in the `compose.yml` file, with values ranging from `2.0` to `3.8`, which refer to the specific [file formats](#compose-file-format-versioning).
27+
Typically, Compose V1 projects include a top-level `version` element in the `compose.yaml` file, with values ranging from `2.0` to `3.8`, which refer to the specific [file formats](#compose-file-format-versioning).
2828

2929
Version two of the Docker Compose command-line binary was announced in 2020, is written in Go, and is invoked with `docker compose`.
30-
Compose V2 ignores the `version` top-level element in the `compose.yml` file.
30+
Compose V2 ignores the `version` top-level element in the `compose.yaml` file.
3131

3232
### Compose file format versioning
3333

content/manuals/compose/support-and-feedback/faq.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,16 @@ aliases:
1111

1212
### What is the difference between `docker compose` and `docker-compose`
1313

14-
Version one of the Docker Compose command-line binary was first released in 2014. It was written in Python, and is invoked with `docker-compose`. Typically, Compose V1 projects include a top-level version element in the compose.yml file, with values ranging from 2.0 to 3.8, which refer to the specific file formats.
14+
Version one of the Docker Compose command-line binary was first released in 2014. It was written in Python, and is invoked with `docker-compose`. Typically, Compose V1 projects include a top-level version element in the compose.yaml file, with values ranging from 2.0 to 3.8, which refer to the specific file formats.
1515

16-
Version two of the Docker Compose command-line binary was announced in 2020, is written in Go, and is invoked with `docker compose`. Compose V2 ignores the version top-level element in the compose.yml file.
16+
Version two of the Docker Compose command-line binary was announced in 2020, is written in Go, and is invoked with `docker compose`. Compose V2 ignores the version top-level element in the compose.yaml file.
1717

1818
For further information, see [History and development of Compose](/manuals/compose/intro/history.md).
1919

2020
### What's the difference between `up`, `run`, and `start`?
2121

2222
Typically, you want `docker compose up`. Use `up` to start or restart all the
23-
services defined in a `compose.yml`. In the default "attached"
23+
services defined in a `compose.yaml`. In the default "attached"
2424
mode, you see all the logs from all the containers. In "detached" mode (`-d`),
2525
Compose exits after starting the containers, but the containers continue to run
2626
in the background.

content/manuals/compose/support-and-feedback/samples-for-compose.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ if you have not already done so.
1717
The samples should help you to:
1818

1919
- Define services based on Docker images using
20-
[Compose files](/reference/compose-file/_index.md): `compose.yml` and
20+
[Compose files](/reference/compose-file/_index.md): `compose.yaml` and
2121
`docker-stack.yml`
22-
- Understand the relationship between `compose.yml` and
22+
- Understand the relationship between `compose.yaml` and
2323
[Dockerfiles](/reference/dockerfile/)
2424
- Learn how to make calls to your application services from Compose files
2525
- Learn how to deploy applications and services to a [swarm](/manuals/engine/swarm/_index.md)

content/manuals/engine/cli/otel.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ The following Docker Compose file bootstraps a set of services to get started wi
6363
It includes an OpenTelemetry collector that the CLI can send metrics to,
6464
and a Prometheus backend that scrapes the metrics off the collector.
6565

66-
```yaml {collapse=true,title=compose.yml}
66+
```yaml {collapse=true,title=compose.yaml}
6767
name: cli-otel
6868
services:
6969
prometheus:
@@ -95,7 +95,7 @@ volumes:
9595
```
9696
9797
This service assumes that the following two configuration files exist alongside
98-
`compose.yml`:
98+
`compose.yaml`:
9999

100100
- ```yaml {collapse=true,title=otelcol.yml}
101101
# Receive signals over gRPC and HTTP

content/manuals/engine/security/trust/trust_sandbox.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,10 @@ the `trustsandbox` container, the Notary server, and the Registry server.
6767
$ mkdir trustsandbox
6868
$ cd trustsandbox
6969

70-
2. Create a file called `compose.yml` with your favorite editor. For example, using vim:
70+
2. Create a file called `compose.yaml` with your favorite editor. For example, using vim:
7171

72-
$ touch compose.yml
73-
$ vim compose.yml
72+
$ touch compose.yaml
73+
$ vim compose.yaml
7474

7575
3. Add the following to the new file.
7676

content/manuals/engine/swarm/services.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -712,7 +712,7 @@ $ docker service create \
712712
nginx
713713
```
714714

715-
You can also use the `constraint` service-level key in a `compose.yml`
715+
You can also use the `constraint` service-level key in a `compose.yaml`
716716
file.
717717

718718
If you specify multiple placement constraints, the service only deploys onto

content/manuals/engine/swarm/stack-deploy.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ counter whenever you visit it.
111111
CMD ["python", "app.py"]
112112
```
113113

114-
5. Create a file called `compose.yml` and paste this in:
114+
5. Create a file called `compose.yaml` and paste this in:
115115

116116
```yaml
117117
services:
@@ -220,7 +220,7 @@ The stack is now ready to be deployed.
220220
1. Create the stack with `docker stack deploy`:
221221

222222
```console
223-
$ docker stack deploy --compose-file compose.yml stackdemo
223+
$ docker stack deploy --compose-file compose.yaml stackdemo
224224

225225
Ignoring unsupported options: build
226226

content/manuals/extensions/extensions-sdk/architecture/_index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,9 @@ Usually, the backend is made of one container that runs within the Docker Deskto
6464
a Docker Compose project, creates the container from the `image` option of the `vm` section of the `metadata.json`, and
6565
attaches it to the Compose project. See the [ui metadata section](metadata.md#vm-section) for more details.
6666

67-
In some cases, a `compose.yml` file can be used instead of an `image`. This is useful when the backend container
67+
In some cases, a `compose.yaml` file can be used instead of an `image`. This is useful when the backend container
6868
needs more specific options, such as mounting volumes or requesting [capabilities](https://docs.docker.com/engine/reference/run/#runtime-privilege-and-linux-capabilities)
69-
that can't be expressed just with a Docker image. The `compose.yml` file can also be used to add multiple containers
69+
that can't be expressed just with a Docker image. The `compose.yaml` file can also be used to add multiple containers
7070
needed by the extension, like a database or a message broker.
7171
Note that, if the Compose file defines many services, the SDK can only contact the first of them.
7272

content/manuals/extensions/extensions-sdk/architecture/metadata.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ Other UI extension points will be available in the future.
5050
### VM section
5151

5252
The `vm` section defines a backend service that runs inside the Desktop VM. It must define either an `image` or a
53-
`docker-compose.yaml` file that specifies what service to run in the Desktop VM.
53+
`compose.yaml` file that specifies what service to run in the Desktop VM.
5454

5555
```json
5656
"vm": {
@@ -66,7 +66,7 @@ When you use `image`, a default compose file is generated for the extension.
6666
6767
```json
6868
"vm": {
69-
"composefile": "docker-compose.yaml"
69+
"composefile": "compose.yaml"
7070
},
7171
```
7272

0 commit comments

Comments
 (0)