From 05a060985ffdee52ac814a42d96dd7e0b59d04b1 Mon Sep 17 00:00:00 2001 From: Olivier Scherler Date: Fri, 5 Dec 2025 11:38:51 +0100 Subject: [PATCH 1/2] Clarify `extends` lack of support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `extends` is not supported in `docker stack`, for no good reason, and it’s documented nowhere. --- content/reference/compose-file/services.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/content/reference/compose-file/services.md b/content/reference/compose-file/services.md index 908d310be46..3d7bfba9125 100644 --- a/content/reference/compose-file/services.md +++ b/content/reference/compose-file/services.md @@ -793,6 +793,8 @@ Compose does not automatically import these referenced resources into the extend Circular references with `extends` are not supported, Compose returns an error when one is detected. +`extends` in not supported in `docker stack`, only in `docker compose`, for obscure reasons. + #### Finding referenced service `file` value can be: From 7136e2132482018ce23d270a8ba027db8a7626a1 Mon Sep 17 00:00:00 2001 From: Olivier Scherler Date: Fri, 5 Dec 2025 11:46:23 +0100 Subject: [PATCH 2/2] More `extends` lack of support clarification In the Multiple Compose Files guide. Mention the useless message that `docker stack config` spits out, so that search engines can find it. --- .../manuals/compose/how-tos/multiple-compose-files/extends.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/content/manuals/compose/how-tos/multiple-compose-files/extends.md b/content/manuals/compose/how-tos/multiple-compose-files/extends.md index d2dccccbc51..f2cd4b96f34 100644 --- a/content/manuals/compose/how-tos/multiple-compose-files/extends.md +++ b/content/manuals/compose/how-tos/multiple-compose-files/extends.md @@ -19,6 +19,10 @@ service options in one place and refer to it from anywhere. You can refer to another Compose file and select a service you want to also use in your own application, with the ability to override some attributes for your own needs. +> [!IMPORTANT] +> +> `extends` in not supported in `docker stack`, only in `docker compose`, for obscure reasons. Running `docker stack config` on a compose file that uses it will result in the following useless message: “Configuration contains forbidden properties”. + > [!IMPORTANT] > > When you use multiple Compose files, you must make sure all paths in the files