Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Support windows named pipe #875
Support Windows named pipe like this :
final DockerClient docker = new DefaultDockerClient("npipe:////./pipe/docker_engine");
Example in fabric8io docker maven plugin :
Extract from Docker for Windows Faq
referenced this issue
Sep 8, 2017
So would things just work if DefaultDockerClient just stripped "npipe:////./pipe/docker_engine" down to "//./pipe/docker_engine" and treated that as a file and talked to it like https://stackoverflow.com/a/2605884/553994. Hm might be a fair amount of work now that I look at how we talk to Unix sockets.
I wanted to give this a try, here is what I was able to do so far: hazsetata@446ef75
It uses a RandomAccessFile and wraps it in a Socket (supporting only the bare minimal things that are needed to make this work). I then created a SocketFactory very similar to the Unix socket implementation's and modified DockerHost / DefaultDockerClient to support it.
It compiles, runs but some of the tests hang. I'm not sure yet what causes that, one possibility that I'll have to check is that because the code uses a file, the read() methods do not timeout (with a real Socket they would). If supporting that is a requirement, I'm not sure yet how to proceed.
Any comments / ideas would be very welcome!
Hi, i'm author of npipe implementation in fabric8io/docker-maven-plugin that you mentioned, see fabric8io/docker-maven-plugin@8112cdf#diff-1fec0d18db7198d4e068ea33ca319dca. I'll rewrite it for this project, PR coming soon ...