Description
Please see the steps below.
Steps To Reproduce
- With these
compose.yaml, dir/included.yaml and dir/extended.yaml files:
---
# compose.yaml
include:
- project_directory: .
path: dir/included.yaml
---
# dir/included.yaml
services:
included:
extends:
file: dir/extended.yaml
service: extended
---
# dir/extended.yaml
services:
extended:
image: image
- Observe the output of the
config command when ran from . or dir:
$ docker compose config
name: proj-dir
services:
included:
image: image
networks:
default: null
networks:
default:
name: proj-dir_default
$ env -C dir docker compose config
cannot read dir/extended.yaml
Compose Version
Docker Compose version v2.24.6
Docker Environment
No response
Anything else?
Furthermore, in case of "double extends", I mean if dir/extended.yaml would look ... "as expected" ... like this:
services:
extended:
extends:
file: dir/base.yaml
service: base
with dir/base.yaml like this:
services:
base:
image: image
it would lead to:
$ docker compose config
cannot read dir/dir/base.yaml
Which could be fixed by mixing both ways of referring to files in dir, but ... I guess this has to wait and see if the very first extend was indeed supposed to be relative to the customized project directory anyway ...
Description
Please see the steps below.
Steps To Reproduce
compose.yaml,dir/included.yamlanddir/extended.yamlfiles:configcommand when ran from.ordir:Compose Version
Docker Environment
No response
Anything else?
Furthermore, in case of "double extends", I mean if
dir/extended.yamlwould look ... "as expected" ... like this:with
dir/base.yamllike this:it would lead to:
Which could be fixed by mixing both ways of referring to files in
dir, but ... I guess this has to wait and see if the very first extend was indeed supposed to be relative to the customized project directory anyway ...