Various context fixups#1734
Merged
jedevc merged 2 commits intodocker:masterfrom Apr 14, 2023
Merged
Conversation
The updateContext function may make modifications to the build inputs, creating either an SSH URL, or an SSH llb.State. In these cases, we need to ensure that we appropriately expose the client's default agent. Previously, we would only expose it if the remote context was a git URL, however, we need to also ensure that if the input was used to override the context (in the case of ReadRemoteFiles), that we expose the agent here as well. Signed-off-by: Justin Chadwell <[email protected]>
Dockerfiles can be HTTP URLs as well as local paths 🤦 We just copy the same logic we use for resolving context paths, and apply it here as well. Signed-off-by: Justin Chadwell <[email protected]>
e7356d9 to
566f41b
Compare
crazy-max
approved these changes
Apr 14, 2023
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.
🐛 More context bug fixes 🎉
See commit messages for more details.
Fixes resolving the context for remote bake files over SSH:
bake: forward default ssh agent for remote bake file #1711 only fixed this for
--print, we actually do two loads of the same context: one for bake to read the file, and another for the build to read the contents of the Dockerfile.Fixes resolving dockerfile URLs for the controller:
build: fixup resolvePaths for remote context path #1701 only fixes this for the context path, I wasn't aware that the Dockerfile path is explicitly allowed to be an HTTP URL:
buildx/build/build.go
Lines 1314 to 1323 in 672eeed