瀏覽代碼

Merge pull request #25903 from anusha-ragunathan/windows_plugin_spec

Add spec file support for Windows plugin discovery.
Brian Goff 8 年之前
父節點
當前提交
8c5c2842ba
共有 3 個文件被更改,包括 11 次插入1 次删除
  1. 0 1
      pkg/plugins/discovery.go
  2. 3 0
      pkg/plugins/discovery_unix.go
  3. 8 0
      pkg/plugins/discovery_windows.go

+ 0 - 1
pkg/plugins/discovery.go

@@ -16,7 +16,6 @@ var (
 	// ErrNotFound plugin not found
 	ErrNotFound = errors.New("plugin not found")
 	socketsPath = "/run/docker/plugins"
-	specsPaths  = []string{"/etc/docker/plugins", "/usr/lib/docker/plugins"}
 )
 
 // localRegistry defines a registry that is local (using unix socket).

+ 3 - 0
pkg/plugins/discovery_unix.go

@@ -0,0 +1,3 @@
+package plugins
+
+var specsPaths = []string{"/etc/docker/plugins", "/usr/lib/docker/plugins"}

+ 8 - 0
pkg/plugins/discovery_windows.go

@@ -0,0 +1,8 @@
+package plugins
+
+import (
+	"os"
+	"path/filepath"
+)
+
+var specPaths = []string{filepath.Join(os.Getenv("programdata"), "docker", "plugins")}