Closed eldiaboloz closed 1 month ago
AFAICT your expectation is wrong.
you combine main
+ extends
main
via include declares VARA=test
extends
has include to apply both service-main
and service-extend
. Apply does combine those files and applies ! override
, so environment set by service-main
is ignore and the resulting model defines VARB=testthe resulting model are merged, so you get VARA
and VARB
declared.
Thanks @ndeloof for the explanation.
In the end I achieved what I needed with a compose.override.yaml
symlink, which points to non-existent file by default.
And when you put a file where the symlink is pointing to, the !override
or !reset
works as expected ( as they modify the service without new includes ).
I didn't know that you can use a broken symlink with the .override file like this.
That's not a documented feature, you should not rely on this behavior which could be considered a bug
Description
I am trying to use nested includes and it seems the !override option is not working as expected. I have read a similar issue and tried the same approach, but it doesnt work if there are multiple level of includes
Steps To Reproduce
create 4 yaml files: main.yaml:
extend.yaml:
service-main.yaml:
service-extend.yaml:
run docker config
expected output:
actual output:
Compose Version
Docker Environment
No response
Anything else?
No response