-
Notifications
You must be signed in to change notification settings - Fork 5.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Build context path is wrong since v2.29.0 on edge cases #12004
Comments
It looks like the same issue as this one #12001 |
👋 @tasarren |
Yes, sorry it was late night and it looks like I misread After testing all releases, the wrong behaviour starts from version @idsulik It looks like the same issue yes, the interpolation is being added after the merge, but during the merge it detects an empty context property and tries to fill it using the |
I confirm this the same as #12001 , so I close this issue to keep only one for collecting feedback |
Description
Prior to the release of v2.29.0 we could build our images when mixing up YAML configs but now our context path gets messy and fails to build.
This bug only happens whenever you extend from another compose file that already contains a context defined and yours does not, maybe there is a race condition going on here.
This was actually mentioned on the Pull Request from another user compose-spec/compose-spec#376 (comment) but I think the edge case in here is to use the YAML file from which you extend in another folder.
Steps To Reproduce
/tmp/foo_project
/tmp/foo_project/docker-compose.yaml
with the following contents/tmp/foo_project/custom/docker-compose.custom.yaml
with the following contents:PROJECT_DIR=/tmp/foo_project docker compose config
Your output contains both directories, from the base project and the ENV variable we have injected
The context path contains both, the custom and the defined context path that contains the real path we should be using which is
${PROJECT_DIR}
Compose Version
Docker Environment
EDIT: Typos, sorry, maybe there are more.
Anything else?
No response
The text was updated successfully, but these errors were encountered: