fix: preserve ssh:// URL scheme when resolving Dockerfile path#13669
Merged
glours merged 1 commit intodocker:mainfrom Mar 27, 2026
Merged
fix: preserve ssh:// URL scheme when resolving Dockerfile path#13669glours merged 1 commit intodocker:mainfrom
glours merged 1 commit intodocker:mainfrom
Conversation
filepath.Join cleans its arguments, collapsing the double slash in ssh:// URLs to a single slash (ssh:/), corrupting the scheme before it reaches buildx. Return the dockerfile as-is for any URL-schemed context, matching the existing behaviour for git:// and https:// URLs. Fixes the issue docker#13668 Signed-off-by: Samaresh Kumar Singh <ssam3003@gmail.com>
6672b7a to
0c5a3e3
Compare
Contributor
|
/review |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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.


When using an
ssh://URL as build context,filepath.Joinwas silently collapsing the double slash into a single one (ssh://→ssh:/), making buildx unable to locate the Dockerfile. The fix returns the Dockerfile name as-is for any context containing a URL scheme (://), since buildx already knows how to resolve it relative to the remote context - the same way we already handlegit://andhttps://contexts. Fix for the bug #13668.