docker-api-rs icon indicating copy to clipboard operation
docker-api-rs copied to clipboard

Support for npipe protocol for connecting on Windows

Open Slonegg opened this issue 2 years ago • 1 comments

Is it possible to add support for connecting to Docker using npipe:////./pipe/docker_engine like in this guide? Currently I'm using tcp://localhost:2375 protocol. However, to use that protocol it is necessary to enable "Expose daemon on tcp://localhost:2375 without TLS" feature in Docker settings which is not convenient if you need to configure many machines. It is also slower and less secure.

Slonegg avatar May 12 '23 04:05 Slonegg

I personally don't have access to Windows host to implement it but I can leave some suggestions here. For the implementation, probably it'd be best to use windows-rs. All of the connectors like TCP, UNIX, TLS are created using hyper. For reference, here is unix connector from hyperlocal. Something similar would have to be implemented for windows npipes, and from what I saw there is no implementation available yet.

Here is how Docker calls npipe requests https://github.com/moby/moby/blob/9e6370819bf61de7583ea00af13fcbedd2bbbfe7/testutil/request/npipe_windows.go#L10

vv9k avatar May 12 '23 06:05 vv9k