Update note about build + image with extends

Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
This commit is contained in:
Aanand Prasad 2016-02-25 15:15:18 -08:00
parent 5111d0862c
commit 2cd1b94dd3
1 changed files with 11 additions and 25 deletions

View File

@ -290,31 +290,17 @@ replaces the old value.
# result # result
command: python otherapp.py command: python otherapp.py
In the case of `build` and `image`, using one in the local service causes > **Note:** In the case of `build` and `image`, when using
Compose to discard the other, if it was defined in the original service. > [version 1 of the Compose file format](compose-file.md#version-1), using one
> option in the local service causes Compose to discard the other option if it
Example of image replacing build: > was defined in the original service.
>
# original service > For example, if the original service defines `image: webapp` and the
build: . > local service defines `build: .` then the resulting service will have
> `build: .` and no `image` option.
# local service >
image: redis > This is because `build` and `image` cannot be used together in a version 1
> file.
# result
image: redis
Example of build replacing image:
# original service
image: redis
# local service
build: .
# result
build: .
For the **multi-value options** `ports`, `expose`, `external_links`, `dns` and For the **multi-value options** `ports`, `expose`, `external_links`, `dns` and
`dns_search`, Compose concatenates both sets of values: `dns_search`, Compose concatenates both sets of values: