Open i-ky opened 1 month ago
Related to:
After reading through related tickets I managed to find another relevant piece of documentation:
When you use multiple Compose files, you must make sure all paths in the files are relative to the base Compose file (the first Compose file specified with
-f
).
...and
When you use multiple Compose files, all paths in the files are relative to the first configuration file specified with
-f
. You can use the--project-directory
option to override this base path.
This suggests that the described behaviour is intentional.
Nevertheless, I think it would make sense to adjust the piece I quoted above:
When the value supplied is a relative path, it is interpreted as relative to the location of the Compose file.
...because it is misleading or ambiguous at best.
this indeed is a docs issue.
.
is always resolved relative to the project directory
Proposal related to this;
this indeed is a docs issue.
@ndeloof, thank you for confirming this! Can I leave it to you to reclassify the issue as a docs issue instead of bug (and possibly move to a more appropriate repo)?
Description
According to docs
services[].build.context
is interpreted as follows:I am expecting that in case of multiple Compose files by "the location of the Compose file" you mean "the location of the Compose file currently being parsed". But it seems that the location of the first Compose file is used instead.
Steps To Reproduce
Note that
services.foo.build.context
is/tmp/test
. I am expecting it to be/tmp/test
+foo/
(location offoo/compose.yaml
) +./
=/tmp/test/foo
.Compose Version
Docker Environment
Anything else?
No response