bake: load .env file from working dir for compose files by crazy-max · Pull Request #1261 · docker/buildx (original) (raw)
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I think I understand you intentions better now.
Still in the first PR maybe .env
is enough. Just to have compatibility.
For the -f
we can maybe first split the files between compose and HCL. Then parse HCL and store all the attributes in the process. Then parse compose(for the second time if needed) and pass the attributes and variables.
If we support -f
this way it shouldn't be only for some special limited set of HCL files that don't have any blocks but ideally all the vars that would be replaced in HCL would be replaced in Compose yaml as well(and additionally only Compose does .env
as well).