Skip to content

Commit 32bd6ad

Browse files
publish updates from main (#22658)
Automated pull request for publishing docs updates. --------- Co-authored-by: Andrey Sobolev <[email protected]> Co-authored-by: Allie Sadler <[email protected]>
2 parents 8f85995 + 4fd64ac commit 32bd6ad

File tree

5 files changed

+95
-10
lines changed

5 files changed

+95
-10
lines changed

_vale/config/vocabularies/Docker/accept.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@ Zsh
153153
[Ss]warm
154154
[Ss]yscalls?
155155
[Ss]ysfs
156+
[Tt]eardown
156157
[Tt]oolchains?
157158
[Uu]narchived?
158159
[Uu]ngated

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ This page contains information on how you can set or change the following pre-de
2626
- `COMPOSE_ENV_FILES`
2727
- `COMPOSE_MENU`
2828
- `COMPOSE_EXPERIMENTAL`
29+
- `COMPOSE_PROGRESS`
2930

3031
## Methods to override
3132

@@ -192,6 +193,15 @@ This is an opt-out variable. When turned off it deactivates the experimental fea
192193
- `false` or `0`, to disable
193194
- Defaults to: `1`
194195

196+
### COMPOSE\_PROGRESS
197+
198+
{{< summary-bar feature_name="Compose progress" >}}
199+
200+
Defines the type of progress output, if `--progress` isn't used.
201+
202+
Supported values are `auto`, `tty`, `plain`, `json`, and `quiet`.
203+
Default is `auto`.
204+
195205
## Unsupported in Compose V2
196206

197207
The following environment variables have no effect in Compose V2.

content/reference/compose-file/build.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -466,8 +466,7 @@ The long syntax provides more granularity in how the secret is created within
466466
the service's containers.
467467

468468
- `source`: The name of the secret as it exists on the platform.
469-
- `target`: The name of the file to be mounted in `/run/secrets/` in the
470-
service's task containers. Defaults to `source` if not specified.
469+
- `target`: The ID of the secret as declared in the Dockerfile. Defaults to `source` if not specified.
471470
- `uid` and `gid`: The numeric uid or gid that owns the file within
472471
`/run/secrets/` in the service's task containers. Default value is `USER`.
473472
- `mode`: The [permissions](https://wintelguy.com/permissions-calc.pl) for the file to be mounted in `/run/secrets/`
@@ -487,7 +486,7 @@ services:
487486
context: .
488487
secrets:
489488
- source: server-certificate
490-
target: server.cert
489+
target: cert # secret ID in Dockerfile
491490
uid: "103"
492491
gid: "103"
493492
mode: 0440
@@ -496,6 +495,12 @@ secrets:
496495
external: true
497496
```
498497

498+
```dockerfile
499+
# Dockerfile
500+
FROM nginx
501+
RUN --mount=type=secret,id=cert,required=true,target=/root/cert ...
502+
```
503+
499504
Service builds may be granted access to multiple secrets. Long and short syntax for secrets may be used in the
500505
same Compose file. Defining a secret in the top-level `secrets` must not imply granting any service build access to it.
501506
Such grant must be explicit within service specification as [secrets](services.md#secrets) service element.

content/reference/compose-file/services.md

Lines changed: 71 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1395,9 +1395,31 @@ services:
13951395
- mysql
13961396
13971397
networks:
1398-
front-tier:
1399-
back-tier:
1400-
admin:
1398+
front-tier: {}
1399+
back-tier: {}
1400+
admin: {}
1401+
```
1402+
1403+
### `interface_name`
1404+
1405+
{{< summary-bar feature_name="Compose interface-name" >}}
1406+
1407+
`interface_name` lets you specify the name of the network interface used to connect a service to a given network. This ensures consistent and predictable interface naming across services and networks.
1408+
1409+
```yaml
1410+
services:
1411+
backend:
1412+
image: alpine
1413+
command: ip link show
1414+
networks:
1415+
back-tier:
1416+
interface_name: eth0
1417+
```
1418+
1419+
Running the example Compose application shows:
1420+
1421+
```console
1422+
backend-1 | 11: eth0@if64: <BROADCAST,MULTICAST,UP,LOWER_UP,M-DOWN> mtu 1500 qdisc noqueue state UP
14011423
```
14021424

14031425
#### `ipv4_address`, `ipv6_address`
@@ -1693,6 +1715,46 @@ services:
16931715
- debug
16941716
```
16951717

1718+
### `provider`
1719+
1720+
{{< summary-bar feature_name="Compose provider services" >}}
1721+
1722+
`provider` can be used to define a service that Compose won't manage directly. Compose delegated the service lifecycle to a dedicated or third-party component.
1723+
1724+
```yaml
1725+
database:
1726+
provider:
1727+
type: awesomecloud
1728+
options:
1729+
type: mysql
1730+
foo: bar
1731+
app:
1732+
image: myapp
1733+
depends_on:
1734+
- database
1735+
```
1736+
1737+
As Compose runs the application, the `awesomecloud` binary is used to manage the `database` service setup.
1738+
Dependent service `app` receives additional environment variables prefixed by the service name so it can access the resource.
1739+
1740+
For illustration, assuming `awesomecloud` execution produced variables `URL` and `API_KEY`, the `app` service
1741+
runs with environment variables `DATABASE_URL` and `DATABASE_API_KEY`.
1742+
1743+
As Compose stops the application, the `awesomecloud` binary is used to manage the `database` service tear down.
1744+
1745+
The mechanism used by Compose to delegate the service lifecycle to an external binary is described [here](https://github.com/docker/compose/tree/main/docs/extension.md).
1746+
1747+
For more information on using the `provider` attribute, see [Use provider services](/manuals/compose/how-tos/provider-services.md).
1748+
1749+
### `type`
1750+
1751+
`type` attribute is required. It defines the external component used by Compose to manage setup and tear down lifecycle
1752+
events.
1753+
1754+
### `options`
1755+
1756+
`options` are specific to the selected provider and not validated by the compose specification
1757+
16961758
### `pull_policy`
16971759

16981760
`pull_policy` defines the decisions Compose makes when it starts to pull images. Possible values are:
@@ -2035,6 +2097,11 @@ The short syntax uses a single string with colon-separated values to specify a v
20352097
> platform it rejects Compose files which use relative host paths with an error. To avoid ambiguities
20362098
> with named volumes, relative paths should always begin with `.` or `..`.
20372099

2100+
> [!NOTE]
2101+
>
2102+
> For bind mounts, the short syntax creates a directory at the source path on the host if it doesn't exist. This is for backward compatibility with `docker-compose` legacy.
2103+
> It can be prevented by using long syntax and setting `create_host_path` to `false`.
2104+
20382105
#### Long syntax
20392106

20402107
The long form syntax lets you configure additional fields that can't be
@@ -2048,9 +2115,7 @@ expressed in the short form.
20482115
- `read_only`: Flag to set the volume as read-only.
20492116
- `bind`: Used to configure additional bind options:
20502117
- `propagation`: The propagation mode used for the bind.
2051-
- `create_host_path`: Creates a directory at the source path on host if there is nothing present.
2052-
Compose does nothing if there is something present at the path. This is automatically implied by short syntax
2053-
for backward compatibility with `docker-compose` legacy.
2118+
- `create_host_path`: Creates a directory at the source path on host if there is nothing present. Defaults to `true`.
20542119
- `selinux`: The SELinux re-labeling option `z` (shared) or `Z` (private)
20552120
- `volume`: Configures additional volume options:
20562121
- `nocopy`: Flag to disable copying of data from a container when a volume is created.

data/summary.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Build dockerfile inline:
3030
Build entitlements:
3131
requires: Docker Compose [2.27.1](/manuals/compose/releases/release-notes.md#2271) and later
3232
Build multiple exporters:
33-
requires: Docker Buildx [0.13.0]((/manuals/build/release-notes.md#0130) and later
33+
requires: Docker Buildx [0.13.0](/manuals/build/release-notes.md#0130) and later
3434
Buildkit host:
3535
requires: Docker Buildx [0.9.0](/manuals/build/release-notes.md#090) and later
3636
Build privileged:
@@ -97,6 +97,8 @@ Compose gw priority:
9797
requires: Docker Compose [2.33.1](/manuals/compose/releases/release-notes.md#2331) and later
9898
Compose include:
9999
requires: Docker Compose [2.20.3](/manuals/compose/releases/release-notes.md#2203) and later
100+
Compose interface-name:
101+
requires: Docker Compose [2.36.0](/manuals/compose/releases/release-notes.md#2203) and later
100102
Compose label file:
101103
requires: Docker Compose [2.32.2](/manuals/compose/releases/release-notes.md#2232) and later
102104
Compose lifecycle hooks:
@@ -111,6 +113,8 @@ Compose OCI artifact:
111113
requires: Docker Compose [2.34.0](/manuals/compose/releases/release-notes.md#2340) and later
112114
Compose provider services:
113115
requires: Docker Compose [2.36.0](/manuals/compose/releases/release-notes.md) and later
116+
Compose progress:
117+
requires: Docker Compose [2.36.0](/manuals/compose/releases/release-notes.md) and later
114118
Compose replace file:
115119
requires: Docker Compose [2.24.4](/manuals/compose/releases/release-notes.md#2244) and later
116120
Compose required:

0 commit comments

Comments
 (0)