mirror of https://github.com/docker/docs.git
Update docs for volume and networks about the changed behavior of the external key
in newer versions of the format Signed-off-by: Joffrey F <joffrey@docker.com>
This commit is contained in:
parent
ba65aeabbb
commit
2efd2456d7
|
@ -1420,8 +1420,10 @@ If set to `true`, specifies that this volume has been created outside of
|
|||
Compose. `docker-compose up` does not attempt to create it, and raises
|
||||
an error if it doesn't exist.
|
||||
|
||||
`external` cannot be used in conjunction with other volume configuration keys
|
||||
(`driver`, `driver_opts`).
|
||||
For version 2.0 of the format, `external` cannot be used in
|
||||
conjunction with other volume configuration keys (`driver`, `driver_opts`,
|
||||
`labels`). This limitation no longer exists for
|
||||
[version 2.1](compose-versioning.md#version-21) and above.
|
||||
|
||||
In the example below, instead of attempting to create a volume called
|
||||
`[projectname]_data`, Compose looks for an existing volume simply
|
||||
|
@ -1593,8 +1595,10 @@ If set to `true`, specifies that this network has been created outside of
|
|||
Compose. `docker-compose up` does not attempt to create it, and raises
|
||||
an error if it doesn't exist.
|
||||
|
||||
`external` cannot be used in conjunction with other network configuration keys
|
||||
(`driver`, `driver_opts`, `group_add`, `ipam`, `internal`).
|
||||
For version 2.0 of the format, `external` cannot be used in conjunction with
|
||||
other network configuration keys (`driver`, `driver_opts`, `ipam`, `internal`).
|
||||
This limitation no longer exists for
|
||||
[version 2.1](compose-versioning.md#version-21) and above.
|
||||
|
||||
In the example below, `proxy` is the gateway to the outside world. Instead of
|
||||
attempting to create a network called `[projectname]_outside`, Compose
|
||||
|
|
|
@ -1956,14 +1956,16 @@ If set to `true`, specifies that this volume has been created outside of
|
|||
Compose. `docker-compose up` does not attempt to create it, and raises
|
||||
an error if it doesn't exist.
|
||||
|
||||
`external` cannot be used in conjunction with other volume configuration keys
|
||||
(`driver`, `driver_opts`).
|
||||
For version 3.3 and below of the format, `external` cannot be used in
|
||||
conjunction with other volume configuration keys (`driver`, `driver_opts`,
|
||||
`labels`). This limitation no longer exists for
|
||||
[version 3.4](compose-versioning.md#version-34) and above.
|
||||
|
||||
In the example below, instead of attempting to create a volume called
|
||||
`[projectname]_data`, Compose looks for an existing volume simply
|
||||
called `data` and mount it into the `db` service's containers.
|
||||
|
||||
version: '2'
|
||||
version: '3'
|
||||
|
||||
services:
|
||||
db:
|
||||
|
@ -2207,15 +2209,17 @@ If set to `true`, specifies that this network has been created outside of
|
|||
Compose. `docker-compose up` does not attempt to create it, and raises
|
||||
an error if it doesn't exist.
|
||||
|
||||
`external` cannot be used in conjunction with other network configuration keys
|
||||
(`driver`, `driver_opts`, `ipam`, `internal`).
|
||||
For version 3.3 and below of the format, `external` cannot be used in
|
||||
conjunction with other network configuration keys (`driver`, `driver_opts`,
|
||||
`ipam`, `internal`). This limitation no longer exists for
|
||||
[version 3.4](compose-versioning.md#version-34) and above.
|
||||
|
||||
In the example below, `proxy` is the gateway to the outside world. Instead of
|
||||
attempting to create a network called `[projectname]_outside`, Compose
|
||||
looks for an existing network simply called `outside` and connect the `proxy`
|
||||
service's containers to it.
|
||||
|
||||
version: '2'
|
||||
version: '3'
|
||||
|
||||
services:
|
||||
proxy:
|
||||
|
|
Loading…
Reference in New Issue