Skip to content
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

driver: add npipe url scheme support #2250

Merged
merged 1 commit into from Feb 7, 2024
Merged

Conversation

iankingori
Copy link
Contributor

@iankingori iankingori commented Feb 7, 2024

Buildkit on windows exposes an npipe endpoint (npipe:////./pipe/buildkitd) which can be used to create a remote builder for WCOW.

Testing this with a simple docker file gives the result below:

image

- enables remote builder and buildx create on windows
Signed-off-by: Ian King'ori <kingorim.ian@gmail.com>
Copy link
Collaborator

@jedevc jedevc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, yeah, this has always been valid!

LGTM, thanks! 🎉

@profnandaa
Copy link

Good catch, thanks!

@jedevc jedevc merged commit 8f8ed68 into docker:master Feb 7, 2024
63 checks passed
@crazy-max crazy-max added this to the v0.13.0 milestone Feb 12, 2024
@tianon-sso
Copy link
Member

I'm trying to test this out with buildkit 0.13.0-rc2 and I think I must be holding it wrong (or maybe this PR wasn't enough? I believe the above screenshot says otherwise 😅)

I've got buildkitd.exe running successfully on my host, and I've got buildctl.exe successfully connecting to it, but when I try to run buildx 0.13.0-rc1 connected to it via buildx create --name windows --driver remote npipe:////./pipe/buildkitd, all subsequent commands then fail to connect and I'm at a loss for understanding why. 🙈

$ ~/Downloads/buildkit/buildctl.exe du
ID      RECLAIMABLE     SIZE    LAST ACCESSED
Reclaimable:    0B
Total:          0B

$ ~/Downloads/buildx-v0.13.0-rc1.windows-amd64.exe create --name windows --driver remote npipe:////./pipe/buildkitd
windows

$ ~/Downloads/buildx-v0.13.0-rc1.windows-amd64.exe --builder windows du
ERROR: failed to call diskusage: Unavailable: connection error: desc = "transport: Error while dialing: dial npipe: unknown network npipe"

Any clues as to what I've missed? Maybe I've misunderstood this PR entirely? 😂 ❤️ 🙇

@iankingori
Copy link
Contributor Author

iankingori commented Feb 27, 2024

@tianon-sso this is interesting, appears to be a regression between when I checked in the code and now. I've tested using my previous buildx binary in docker and the rc. I'll put up a fix and add tests to catch this next time

image

@iankingori
Copy link
Contributor Author

Seems this PR changed the remote driver to use dialer which doesn't support npipes. Trying to see whether we can use DialPipe from go winio

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants