compose icon indicating copy to clipboard operation
compose copied to clipboard

Allow glob in include statement paths

Open brad2014 opened this issue 11 months ago • 3 comments

Description

To create a compose environment that allows for plugins/extensions, we would like to be able to say:

services:
  # common services for this designed environment

include: docker-compose.d/*.yml # admin selected plugins for this environment, loaded in alphabetical order 

Of course, because the order of inclusion may matter for certain compose environments (not all), the glob would be sorted, and admins would have the ability to name their drop-in files as is customary in traditional unix subsystems that support drop-ins (e.g. /etc/sysctl.d, /etc/grub.d, /etc/X11/xinit/xinitrc.d, etc) : 00-firstcompose.yml, 05-earlycompose.yml, 99-finalcompose.yml, etc.

brad2014 avatar Jan 24 '25 13:01 brad2014

docker compose -f doesn't support glob patterns, so I don't see any reason include would.

ndeloof avatar Jan 24 '25 13:01 ndeloof

docker compose -f doesn't support glob patterns, so I don't see any reason include would.

Indeed, the feature request is for a feature that is not currently supported. The use case providing the reason for including it is described in the feature request, to allow for the creation of environments that permit plugins/extensions developed separately and dropped in at the option of the site admin.

Presumably, if this is considered a feature worth supporting, the -f flag could work similarly if the feature were implemented (although that is not part of this feature request, it wouldn't interfere with our use case).

If a decision was already made to consider and reject that use case, my apologies.

brad2014 avatar Jan 24 '25 13:01 brad2014

see https://github.com/docker/compose/issues/10857

ndeloof avatar Jan 24 '25 14:01 ndeloof