diff --git a/content/reference/compose-file/build.md b/content/reference/compose-file/build.md index 86230c6ed335..4ae115b7b56c 100644 --- a/content/reference/compose-file/build.md +++ b/content/reference/compose-file/build.md @@ -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. @@ -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. diff --git a/content/reference/compose-file/configs.md b/content/reference/compose-file/configs.md index 99a22479e9ab..f81b3f2fa151 100644 --- a/content/reference/compose-file/configs.md +++ b/content/reference/compose-file/configs.md @@ -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: diff --git a/content/reference/compose-file/networks.md b/content/reference/compose-file/networks.md index f70cdbde6cd4..e0e6c98018ec 100644 --- a/content/reference/compose-file/networks.md +++ b/content/reference/compose-file/networks.md @@ -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 @@ -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" >}} diff --git a/content/reference/compose-file/services.md b/content/reference/compose-file/services.md index 2e9a14532858..d3566b4f0fd2 100644 --- a/content/reference/compose-file/services.md +++ b/content/reference/compose-file/services.md @@ -1438,7 +1438,7 @@ networks: admin: {} ``` -### `interface_name` +#### `interface_name` {{< summary-bar feature_name="Compose interface-name" >}} @@ -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" >}} diff --git a/data/summary.yaml b/data/summary.yaml index ee6a11dd5bc8..b7d498eb2321 100644 --- a/data/summary.yaml +++ b/data/summary.yaml @@ -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: