Browse code

Add spec file support for Windows plugin discovery.

Plugin discovery on Windows is not possible using named pipes. However,
it is possible using spec file (tcp based). This adds Windows specific
paths for discovery.

Fixes #23605

Signed-off-by: Anusha Ragunathan <anusha@docker.com>

Anusha Ragunathan authored on 2016/08/20 10:01:14
Showing 3 changed files
... ...
@@ -16,7 +16,6 @@ var (
16 16
 	// ErrNotFound plugin not found
17 17
 	ErrNotFound = errors.New("plugin not found")
18 18
 	socketsPath = "/run/docker/plugins"
19
-	specsPaths  = []string{"/etc/docker/plugins", "/usr/lib/docker/plugins"}
20 19
 )
21 20
 
22 21
 // localRegistry defines a registry that is local (using unix socket).
23 22
new file mode 100644
... ...
@@ -0,0 +1,3 @@
0
+package plugins
1
+
2
+var specsPaths = []string{"/etc/docker/plugins", "/usr/lib/docker/plugins"}
0 3
new file mode 100644
... ...
@@ -0,0 +1,8 @@
0
+package plugins
1
+
2
+import (
3
+	"os"
4
+	"path/filepath"
5
+)
6
+
7
+var specPaths = []string{filepath.Join(os.Getenv("programdata"), "docker", "plugins")}