containerd icon indicating copy to clipboard operation
containerd copied to clipboard

Unix domain socket support for Windows

Open Insvald opened this issue 3 years ago • 7 comments

What is the problem you're trying to solve Containerd works via named pipes in Windows, but gRPC over named pipes is not supported in C# in the meantime. Good news that we can use sockets: https://docs.microsoft.com/en-us/aspnet/core/grpc/interprocess

Describe the solution you'd like Support gRPC clients working with Unix domain sockets in Windows as well as in Linux, and two types of configuration in config.toml for Windows system: both named pipes and Unix domain sockets.

Insvald avatar May 10 '21 20:05 Insvald

Kestrel has built-in support for UDS endpoints. UDS are supported on Linux, macOS and modern versions of Windows.

Wow. I didn't know that. If Go supports Unix domain sockets in Windows, containerd should work without any changes in our side. Isn't it?

kzys avatar Jul 02 '21 22:07 kzys

Kestrel has built-in support for UDS endpoints. UDS are supported on Linux, macOS and modern versions of Windows.

Wow. I didn't know that. If Go supports Unix domain sockets in Windows, containerd should work without any changes in our side. Isn't it?

Yes, hopefully

Insvald avatar Jul 03 '21 10:07 Insvald

This would be pretty cool, can look into this. iirc there were some issues/bugs with uds on some newer versions of windows. Have to remember what the issue(s) were first..

dcantah avatar Nov 04 '21 23:11 dcantah

@kzys Here's the original blog post for more info https://devblogs.microsoft.com/commandline/af_unix-comes-to-windows/

dcantah avatar Nov 04 '21 23:11 dcantah

@Insvald I was able to make a PoC to talk to containerd on windows via named pipes. Please look at https://github.com/danespinosa/containerdclient/blob/main/Program.cs

It does work pretty well, although I am trying to talk to the .NET team to understand if this would be the best way :) Please let me know your thoughts, I hope this helps.

danespinosa avatar Jul 28 '22 04:07 danespinosa

@danespinosa Great job! I absolutely must see how this work with my tests )).

Insvald avatar Jul 28 '22 07:07 Insvald

@Insvald I have updated the sample, hope it helps you :)

danespinosa avatar Jul 28 '22 17:07 danespinosa