as can be observed: the command value for "test" service is not reset.
the only workaround i found, was to specify "!reset" directly in compose.yml. but this limits reusability of already working configurations. and it actually breaks things when updating from 2.24.3.
also worth a mention: this is not happening when using compose.override.yml. meaning: if compose.base.yml is renamed to compose.yml and the overrides (which i did leave out in the example files above) are moved to compose.override.yml (dropping the "extends") the command is also correctly reset.
Steps To Reproduce
create compose.base.yml file
create compose.yml file
run docker-compose config
Compose Version
2.24.3
Docker Compose version v2.24.3
2.24.4
Docker Compose version v2.24.4
2.24.5
Docker Compose version v2.24.5
2.24.6
Docker Compose version v2.24.6
2.24.7
Docker Compose version v2.24.7
2.25.0
Docker Compose version v2.25.0
2.26.0
Docker Compose version v2.26.0
2.26.1
Docker Compose version v2.26.1
2.27.0
Docker Compose version v2.27.0
2.27.1
Docker Compose version v2.27.1
2.27.2
Docker Compose version v2.27.2
2.27.3
Docker Compose version v2.27.3
2.28.0
Docker Compose version v2.28.0
2.28.1
Docker Compose version v2.28.1
Description
issue: using a template file which references its own services and uses !reset does not actually reset the value.
i tested all compose versions between 2.24.3 and 2.28.1.
all of the tested versions actually do reset the value, when only rendering the template (i.e.
./docker-compose -f compose.base.yml config
)compose.base.yml
compose.yml
expectation: running
docker-compose config
, "!reset" is evaluated and the resulting service "test" does not have a command configured.expected result (and 2.24.3 actually produces this):
(note: 2.24.7 outputs different, but behaves the same)
actual result (which is produced by 2.24.6+):
as can be observed: the command value for "test" service is not reset.
the only workaround i found, was to specify "!reset" directly in compose.yml. but this limits reusability of already working configurations. and it actually breaks things when updating from 2.24.3.
also worth a mention: this is not happening when using compose.override.yml. meaning: if compose.base.yml is renamed to compose.yml and the overrides (which i did leave out in the example files above) are moved to compose.override.yml (dropping the "extends") the command is also correctly reset.
Steps To Reproduce
docker-compose config
Compose Version
Docker Environment
Anything else?
No response