Skip to content

Commit 4c6f75f

Browse files
authored
Compose spec freshness (#23029)
<!--Delete sections as needed --> ## Description Voila ## 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
1 parent 5a55776 commit 4c6f75f

File tree

17 files changed

+51
-40
lines changed

17 files changed

+51
-40
lines changed

content/reference/compose-file/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ aliases:
4545
4646
The Compose Specification is the latest and recommended version of the Compose file format. It helps you define a [Compose file](/manuals/compose/intro/compose-application-model.md) which is used to configure your Docker application’s services, networks, volumes, and more.
4747

48-
Legacy versions 2.x and 3.x of the Compose file format were merged into the Compose Specification. It is implemented in versions 1.27.0 and above (also known as Compose V2) of the Docker Compose CLI.
48+
Legacy versions 2.x and 3.x of the Compose file format were merged into the Compose Specification. It is implemented in versions 1.27.0 and above (also known as Compose v2) of the Docker Compose CLI.
4949

5050
The Compose Specification on Docker Docs is the Docker Compose implementation. If you wish to implement your own version of the Compose Specification, see the [Compose Specification repository](https://github.com/compose-spec/compose-spec).
5151

content/reference/compose-file/build.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ services:
4949
5050
When used to build service images from source, the Compose file creates three Docker images:
5151
52-
* `example/webapp`: A Docker image is built using `webapp` sub-directory, within the Compose file's parent folder, as the Docker build context. Lack of a `Dockerfile` within this folder throws an error.
52+
* `example/webapp`: A Docker image is built using `webapp` sub-directory, within the Compose file's parent folder, as the Docker build context. Lack of a `Dockerfile` within this folder returns an error.
5353
* `example/database`: A Docker image is built using `backend` sub-directory within the Compose file parent folder. `backend.Dockerfile` file is used to define build steps, this file is searched relative to the context path, which means `..` resolves to the Compose file's parent folder, so `backend.Dockerfile` is a sibling file.
5454
* A Docker image is built using the `custom` directory with the user's `$HOME` as the Docker context. Compose displays a warning about the non-portable path used to build image.
5555

content/reference/compose-file/configs.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Configs top-level elements
3-
description: Explore all the attributes the configs top-level element can have.
3+
description: Manage and share configuration data using the configs element in Docker Compose.
44
keywords: compose, compose specification, configs, compose file reference
55
aliases:
66
- /compose/compose-file/08-configs/

content/reference/compose-file/deploy.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ services:
132132
`resources` configures physical resource constraints for container to run on platform. Those constraints can be configured
133133
as:
134134

135-
- `limits`: The platform must prevent the container to allocate more.
135+
- `limits`: The platform must prevent the container from allocating more resources.
136136
- `reservations`: The platform must guarantee the container can allocate at least the configured amount.
137137

138138
```yml
@@ -270,7 +270,7 @@ deploy:
270270

271271
### `rollback_config`
272272

273-
`rollback_config` configures how the service should be rollbacked in case of a failing update.
273+
`rollback_config` configures how the service should be rolled back in case of a failing update.
274274

275275
- `parallelism`: The number of containers to rollback at a time. If set to 0, all containers rollback simultaneously.
276276
- `delay`: The time to wait between each container group's rollback (default 0s).

content/reference/compose-file/develop.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,6 @@ services:
4343
4444
## Attributes
4545
46-
<!-- vale Docker.HeadingSentenceCase = NO ) -->
47-
4846
The `develop` subsection defines configuration options that are applied by Compose to assist you during development of a service with optimized workflows.
4947

5048
### `watch`
@@ -90,7 +88,7 @@ services:
9088

9189
#### `ignore`
9290

93-
The `ignore` attribute can be used to define a list of patterns for paths to be ignored. Any updated file
91+
The `ignore` attribute is used to define a list of patterns for paths to be ignored. Any updated file
9492
that matches a pattern, or belongs to a folder that matches a pattern, won't trigger services to be re-created.
9593
The syntax is the same as `.dockerignore` file:
9694

@@ -106,7 +104,7 @@ for the `ignores` file, and values set in the Compose model are appended.
106104

107105
It is sometimes easier to select files to be watched instead of declaring those that shouldn't be watched with `ignore`.
108106

109-
The `include` attribute can be used to define a pattern, or a list of patterns, for paths to be considered for watching.
107+
The `include` attribute is used to define a pattern, or a list of patterns, for paths to be considered for watching.
110108
Only files that match these patterns will be considered when applying a watch rule. The syntax is the same as `ignore`.
111109

112110
```yaml
@@ -117,10 +115,15 @@ services:
117115
watch:
118116
# rebuild image and recreate service
119117
- path: ./src
120-
include: *.go
118+
include: "*.go"
121119
action: rebuild
122120
```
123121

122+
> [!NOTE]
123+
>
124+
> In many cases `include` patterns start with a wildcard (`*`) character. This has special meaning in YAML syntax
125+
> to define an [alias node](https://yaml.org/spec/1.2.2/#alias-nodes) so you have to wrap pattern expression with quotes.
126+
124127
#### `path`
125128

126129
`path` attribute defines the path to source code (relative to the project directory) to monitor for changes. Updates to any file

content/reference/compose-file/extension.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Extensions
3-
description: Understand how to use extensions
3+
description: Define and reuse custom fragments with extensions in Docker Compose
44
keywords: compose, compose specification, extensions, compose file reference
55
aliases:
66
- /compose/compose-file/11-extension/
@@ -117,7 +117,7 @@ services:
117117
>
118118
> In the example above, the environment variables are declared using the `FOO: BAR` mapping syntax, while the sequence syntax `- FOO=BAR` is only valid when no fragments are involved.
119119

120-
## Informative Historical Notes
120+
## Informative historical notes
121121

122122
This section is informative. At the time of writing, the following prefixes are known to exist:
123123

content/reference/compose-file/fragments.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Fragments
3-
description: Understand how to use fragments
3+
description: Reuse configuration with YAML anchors and fragments
44
keywords: compose, compose specification, fragments, compose file reference
55
aliases:
66
- /compose/compose-file/10-fragments/

content/reference/compose-file/include.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
2-
title: Include
3-
description: Learn about include
2+
linkTitle: Include
3+
title: Use include to modularize Compose files
4+
description: Reference external Compose files using the include top-level element
45
keywords: compose, compose specification, include, compose file reference
56
aliases:
67
- /compose/compose-file/14-include/
@@ -9,10 +10,10 @@ weight: 110
910

1011
{{< summary-bar feature_name="Composefile include" >}}
1112

12-
A Compose application can declare dependency on another Compose application. This is useful if:
13+
You can reuse and modularize Docker Compose configurations by including other Compose files. This is useful if:
1314
- You want to reuse other Compose files.
1415
- You need to factor out parts of your application model into separate Compose files so they can be managed separately or shared with others.
15-
- Teams need to keep a Compose file reasonably complicated for the limited amount of resources it has to declare for its own sub-domain within a larger deployment.
16+
- Teams need to maintain a Compose file with only necessary complexity for the limited amount of resources it has to declare for its own sub-domain within a larger deployment.
1617

1718
The `include` top-level section is used to define the dependency on another Compose application, or sub-domain.
1819
Each path listed in the `include` section is loaded as an individual Compose application model, with its own project directory, in order to resolve relative paths.

content/reference/compose-file/interpolation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Interpolation
3-
description: Learn about interpolation
3+
description: Substitute environment variables in Docker Compose files using interpolation syntax.
44
keywords: compose, compose specification, interpolation, compose file reference
55
aliases:
66
- /compose/compose-file/12-interpolation/

content/reference/compose-file/merge.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
2-
title: Merge
3-
description: Learn about merging rules
2+
linkTitle: Merge
3+
title: Merge Compose files
4+
description: Understand how Docker Compose merges multiple files and resolves conflicts
45
keywords: compose, compose specification, merge, compose file reference
56
aliases:
67
- /compose/compose-file/13-merge/

0 commit comments

Comments
 (0)