-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Description
Is your feature request related to a problem? Please describe.
Extending services with depends_on does not work and fails with:
services with 'depends_on' cannot be extended
Describe the solution you'd like
From the documentation:
Note: links, volumes_from, and depends_on are never shared between services using extends. These exceptions exist to avoid implicit dependencies—you always define links and volumes_from locally. This ensures dependencies between services are clearly visible when reading the current file. Defining these locally also ensures changes to the referenced file don’t result in breakage.
I interpret this as follows: Extending services with depends_on should work, but you have to redefine your dependencies locally. Which would totally make sense to me.
Describe alternatives you've considered
I don't want to use multiple docker-compose.yml files as there would be no notion of extension of a service (although it is exactly what I want) and it feels like a hacky way to do it.
Additional context
Issue already mentioned: