소스 검색

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 8 년 전
부모
커밋
36cf93fb0c
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 plugin not found
 	ErrNotFound = errors.New("plugin not found")
 	ErrNotFound = errors.New("plugin not found")
 	socketsPath = "/run/docker/plugins"
 	socketsPath = "/run/docker/plugins"
-	specsPaths  = []string{"/etc/docker/plugins", "/usr/lib/docker/plugins"}
 )
 )
 
 
 // localRegistry defines a registry that is local (using unix socket).
 // 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")}