fix: preserve source paths in local build context#20
Open
ducminhle wants to merge 2 commits into
Open
Conversation
Previously buildx_context_local copied file inputs using basename, which flattened nested files into the context root. This broke Dockerfile COPY paths such as nginx/conf.d/default.conf. Copy files using their package-relative path so local build contexts keep the expected directory structure. Signed-off-by: ducminhle <minhducle.it@gmail.com>
Contributor
Author
Signed-off-by: ducminhle <minhducle.it@gmail.com>
Contributor
Probably just an oversight on my part; your change seems like a good one. Now is a good time to decide this behaviour since the rules are still pre-release. 👍 I'm not a maintainer BTW |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Previously buildx_context_local copied file inputs using basename, which flattened nested files into the context root. This broke Dockerfile COPY paths.
Copy files using their package-relative path so local build contexts keep the expected directory structure.
Example build container image from nodejs source:
Dockerfile
Changes are visible to end-users: yes/no
Test plan