Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 21 additions & 21 deletions content/reference/compose-file/build.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,27 +175,6 @@ args:
- GIT_COMMIT
```

### `context`

`context` defines either a path to a directory containing a Dockerfile, or a URL to a Git repository.

When the value supplied is a relative path, it is interpreted as relative to the project directory.
Compose warns you about the absolute path used to define the build context as those prevent the Compose file
from being portable.

```yml
build:
context: ./dir
```

```yml
services:
webapp:
build: https://github.com/mycompany/webapp.git
```

If not set explicitly, `context` defaults to project directory (`.`).

### `cache_from`

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

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

### `context`

`context` defines either a path to a directory containing a Dockerfile, or a URL to a Git repository.

When the value supplied is a relative path, it is interpreted as relative to the project directory.
Compose warns you about the absolute path used to define the build context as those prevent the Compose file
from being portable.

```yml
build:
context: ./dir
```

```yml
services:
webapp:
build: https://github.com/mycompany/webapp.git
```

If not set explicitly, `context` defaults to project directory (`.`).

### `dockerfile`

`dockerfile` sets an alternate Dockerfile. A relative path is resolved from the build context.
Expand Down
3 changes: 2 additions & 1 deletion content/reference/compose-file/configs.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: Configs top-level elements
linkTitle: Configs
title: Configs top-level element
description: Manage and share configuration data using the configs element in Docker Compose.
keywords: compose, compose specification, configs, compose file reference
aliases:
Expand Down
26 changes: 13 additions & 13 deletions content/reference/compose-file/networks.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,19 @@ For options, see the [Docker Engine docs](https://docs.docker.com/engine/network

## Attributes

### `attachable`

If `attachable` is set to `true`, then standalone containers should be able to attach to this network, in addition to services.
If a standalone container attaches to the network, it can communicate with services and other standalone containers
that are also attached to the network.

```yml
networks:
mynet1:
driver: overlay
attachable: true
```

### `driver`

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

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

### `attachable`

If `attachable` is set to `true`, then standalone containers should be able to attach to this network, in addition to services.
If a standalone container attaches to the network, it can communicate with services and other standalone containers
that are also attached to the network.

```yml
networks:
mynet1:
driver: overlay
attachable: true
```

### `enable_ipv4`

{{< summary-bar feature_name="Compose enable ipv4" >}}
Expand Down
17 changes: 16 additions & 1 deletion content/reference/compose-file/services.md
Original file line number Diff line number Diff line change
Expand Up @@ -1438,7 +1438,7 @@ networks:
admin: {}
```

### `interface_name`
#### `interface_name`

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

Expand Down Expand Up @@ -1514,6 +1514,21 @@ networks:

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

#### `driver_opts`

`driver_opts` specifies a list of options as key-value pairs to pass to the driver. These options are
driver-dependent. Consult the driver's documentation for more information.

```yml
services:
app:
networks:
app_net:
driver_opts:
foo: "bar"
baz: 1
```

#### `gw_priority`

{{< summary-bar feature_name="Compose gw priority" >}}
Expand Down
2 changes: 1 addition & 1 deletion data/summary.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ Compose gw priority:
Compose include:
requires: Docker Compose [2.20.3](/manuals/compose/releases/release-notes.md#2203) and later
Compose interface-name:
requires: Docker Compose [2.36.0](/manuals/compose/releases/release-notes.md#2203) and later
requires: Docker Compose [2.36.0](/manuals/compose/releases/release-notes.md#2360) and later
Compose label file:
requires: Docker Compose [2.32.2](/manuals/compose/releases/release-notes.md#2232) and later
Compose lifecycle hooks:
Expand Down