From 0f4a08f91681b307be03441185dee8a7f09eb721 Mon Sep 17 00:00:00 2001 From: Cedric Brancourt Date: Thu, 16 Feb 2017 19:39:23 +0100 Subject: [PATCH 1/3] fix(compose:extends): not supported from version 3 --- compose/compose-file/compose-versioning.md | 2 ++ compose/compose-file/index.md | 34 ---------------------- compose/extends.md | 2 ++ 3 files changed, 4 insertions(+), 34 deletions(-) diff --git a/compose/compose-file/compose-versioning.md b/compose/compose-file/compose-versioning.md index 9fc2ed401b..2f1354f886 100644 --- a/compose/compose-file/compose-versioning.md +++ b/compose/compose-file/compose-versioning.md @@ -227,6 +227,8 @@ several options have been removed: `deploy`. Note that `deploy` configuration only takes effect when using `docker stack deploy`, and is ignored by `docker-compose`. +- `extends`: This option has been removed. You wont be able to use `extends` along version "3" + ### Version 1 to 2.x In the majority of cases, moving from version 1 to 2 is a very simple process: diff --git a/compose/compose-file/index.md b/compose/compose-file/index.md index 150b3adf6e..1ddae79acc 100644 --- a/compose/compose-file/index.md +++ b/compose/compose-file/index.md @@ -501,40 +501,6 @@ accessible to linked services. Only the internal port can be specified. - "3000" - "8000" -### extends - -Extend another service, in the current file or another, optionally overriding -configuration. - -You can use `extends` on any service together with other configuration keys. -The `extends` value must be a dictionary defined with a required `service` -and an optional `file` key. - - extends: - file: common.yml - service: webapp - -The `service` the name of the service being extended, for example -`web` or `database`. The `file` is the location of a Compose configuration -file defining that service. - -If you omit the `file` Compose looks for the service configuration in the -current file. The `file` value can be an absolute or relative path. If you -specify a relative path, Compose treats it as relative to the location of the -current file. - -You can extend a service that itself extends another. You can extend -indefinitely. Compose does not support circular references and `docker-compose` -returns an error if it encounters one. - -For more on `extends`, see the -[the extends documentation](../extends.md#extending-services). - -> **Note:** This option is not yet supported when -> [deploying a stack in swarm mode](/engine/reference/commandline/stack_deploy.md) -> with a (version 3) Compose file. Use `docker-compose config` to generate a -> configuration with all `extends` options resolved, and deploy from that. - ### external_links Link to containers started outside this `docker-compose.yml` or even outside diff --git a/compose/extends.md b/compose/extends.md index c8d40d0944..c2a6ef8e43 100644 --- a/compose/extends.md +++ b/compose/extends.md @@ -159,6 +159,8 @@ backup, include the `docker-compose.admin.yml` as well. ## Extending services +> Up to version 2.1 , version 3 does not support `extends` yet. + Docker Compose's `extends` keyword enables sharing of common configurations among different files, or even different projects entirely. Extending services is useful if you have several services that reuse a common set of configuration From 989b3a711312dc74f371303cc17bd498316c1181 Mon Sep 17 00:00:00 2001 From: John Mulhausen Date: Thu, 16 Feb 2017 11:54:32 -0800 Subject: [PATCH 2/3] Update compose-versioning.md --- compose/compose-file/compose-versioning.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compose/compose-file/compose-versioning.md b/compose/compose-file/compose-versioning.md index 2f1354f886..7aa9a0709c 100644 --- a/compose/compose-file/compose-versioning.md +++ b/compose/compose-file/compose-versioning.md @@ -227,7 +227,7 @@ several options have been removed: `deploy`. Note that `deploy` configuration only takes effect when using `docker stack deploy`, and is ignored by `docker-compose`. -- `extends`: This option has been removed. You wont be able to use `extends` along version "3" +- `extends`: This option has been removed for `version: "3"` Compose files. ### Version 1 to 2.x From 03464b70cb7c83fb6cf990df3695f0e260c0b6bf Mon Sep 17 00:00:00 2001 From: Victoria Bialas Date: Thu, 16 Feb 2017 14:37:03 -0800 Subject: [PATCH 3/3] changed `version 3` to `version 3.x` per Joffrey --- compose/extends.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compose/extends.md b/compose/extends.md index c2a6ef8e43..de60205dc9 100644 --- a/compose/extends.md +++ b/compose/extends.md @@ -159,7 +159,7 @@ backup, include the `docker-compose.admin.yml` as well. ## Extending services -> Up to version 2.1 , version 3 does not support `extends` yet. +> Up to version 2.1 , version 3.x does not support `extends` yet. Docker Compose's `extends` keyword enables sharing of common configurations among different files, or even different projects entirely. Extending services