Skip to content

Commit 078cf59

Browse files
authored
minor spec updates (#23213)
1 parent 9adf210 commit 078cf59

File tree

5 files changed

+53
-37
lines changed

5 files changed

+53
-37
lines changed

content/reference/compose-file/build.md

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -175,27 +175,6 @@ args:
175175
- GIT_COMMIT
176176
```
177177

178-
### `context`
179-
180-
`context` defines either a path to a directory containing a Dockerfile, or a URL to a Git repository.
181-
182-
When the value supplied is a relative path, it is interpreted as relative to the project directory.
183-
Compose warns you about the absolute path used to define the build context as those prevent the Compose file
184-
from being portable.
185-
186-
```yml
187-
build:
188-
context: ./dir
189-
```
190-
191-
```yml
192-
services:
193-
webapp:
194-
build: https://github.com/mycompany/webapp.git
195-
```
196-
197-
If not set explicitly, `context` defaults to project directory (`.`).
198-
199178
### `cache_from`
200179

201180
`cache_from` defines a list of sources the image builder should use for cache resolution.
@@ -234,6 +213,27 @@ Cache target is defined using the same `type=TYPE[,KEY=VALUE]` syntax defined by
234213

235214
Unsupported caches are ignored and don't prevent you from building images.
236215

216+
### `context`
217+
218+
`context` defines either a path to a directory containing a Dockerfile, or a URL to a Git repository.
219+
220+
When the value supplied is a relative path, it is interpreted as relative to the project directory.
221+
Compose warns you about the absolute path used to define the build context as those prevent the Compose file
222+
from being portable.
223+
224+
```yml
225+
build:
226+
context: ./dir
227+
```
228+
229+
```yml
230+
services:
231+
webapp:
232+
build: https://github.com/mycompany/webapp.git
233+
```
234+
235+
If not set explicitly, `context` defaults to project directory (`.`).
236+
237237
### `dockerfile`
238238

239239
`dockerfile` sets an alternate Dockerfile. A relative path is resolved from the build context.

content/reference/compose-file/configs.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
2-
title: Configs top-level elements
2+
linkTitle: Configs
3+
title: Configs top-level element
34
description: Manage and share configuration data using the configs element in Docker Compose.
45
keywords: compose, compose specification, configs, compose file reference
56
aliases:

content/reference/compose-file/networks.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,19 @@ For options, see the [Docker Engine docs](https://docs.docker.com/engine/network
9999

100100
## Attributes
101101

102+
### `attachable`
103+
104+
If `attachable` is set to `true`, then standalone containers should be able to attach to this network, in addition to services.
105+
If a standalone container attaches to the network, it can communicate with services and other standalone containers
106+
that are also attached to the network.
107+
108+
```yml
109+
networks:
110+
mynet1:
111+
driver: overlay
112+
attachable: true
113+
```
114+
102115
### `driver`
103116

104117
`driver` specifies which driver should be used for this network. Compose returns an error if the
@@ -127,19 +140,6 @@ networks:
127140

128141
Consult the [network drivers documentation](/manuals/engine/network/_index.md) for more information.
129142

130-
### `attachable`
131-
132-
If `attachable` is set to `true`, then standalone containers should be able to attach to this network, in addition to services.
133-
If a standalone container attaches to the network, it can communicate with services and other standalone containers
134-
that are also attached to the network.
135-
136-
```yml
137-
networks:
138-
mynet1:
139-
driver: overlay
140-
attachable: true
141-
```
142-
143143
### `enable_ipv4`
144144

145145
{{< summary-bar feature_name="Compose enable ipv4" >}}

content/reference/compose-file/services.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1438,7 +1438,7 @@ networks:
14381438
admin: {}
14391439
```
14401440

1441-
### `interface_name`
1441+
#### `interface_name`
14421442

14431443
{{< summary-bar feature_name="Compose interface-name" >}}
14441444

@@ -1514,6 +1514,21 @@ networks:
15141514

15151515
`mac_address` sets the Mac address used by the service container when connecting to this particular network.
15161516

1517+
#### `driver_opts`
1518+
1519+
`driver_opts` specifies a list of options as key-value pairs to pass to the driver. These options are
1520+
driver-dependent. Consult the driver's documentation for more information.
1521+
1522+
```yml
1523+
services:
1524+
app:
1525+
networks:
1526+
app_net:
1527+
driver_opts:
1528+
foo: "bar"
1529+
baz: 1
1530+
```
1531+
15171532
#### `gw_priority`
15181533

15191534
{{< summary-bar feature_name="Compose gw priority" >}}

data/summary.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ Compose gw priority:
9898
Compose include:
9999
requires: Docker Compose [2.20.3](/manuals/compose/releases/release-notes.md#2203) and later
100100
Compose interface-name:
101-
requires: Docker Compose [2.36.0](/manuals/compose/releases/release-notes.md#2203) and later
101+
requires: Docker Compose [2.36.0](/manuals/compose/releases/release-notes.md#2360) and later
102102
Compose label file:
103103
requires: Docker Compose [2.32.2](/manuals/compose/releases/release-notes.md#2232) and later
104104
Compose lifecycle hooks:

0 commit comments

Comments
 (0)