2018-12-11 09:03:47 -05:00
|
|
|
package manager
|
|
|
|
|
|
|
|
import (
|
|
|
|
"os"
|
|
|
|
"path/filepath"
|
|
|
|
)
|
|
|
|
|
2024-06-19 08:02:40 -04:00
|
|
|
// defaultSystemPluginDirs are the platform-specific locations to search
|
|
|
|
// for plugins in order of preference.
|
|
|
|
//
|
|
|
|
// Plugin-discovery is performed in the following order of preference:
|
|
|
|
//
|
|
|
|
// 1. The "cli-plugins" directory inside the CLIs config-directory (usually "~/.docker/cli-plugins").
|
|
|
|
// 2. Additional plugin directories as configured through [ConfigFile.CLIPluginsExtraDirs].
|
|
|
|
// 3. Platform-specific defaultSystemPluginDirs (as defined below).
|
|
|
|
//
|
|
|
|
// [ConfigFile.CLIPluginsExtraDirs]: https://pkg.go.dev/github.com/docker/cli@v26.1.4+incompatible/cli/config/configfile#ConfigFile.CLIPluginsExtraDirs
|
2018-12-11 09:03:47 -05:00
|
|
|
var defaultSystemPluginDirs = []string{
|
|
|
|
filepath.Join(os.Getenv("ProgramData"), "Docker", "cli-plugins"),
|
2019-03-19 12:30:14 -04:00
|
|
|
filepath.Join(os.Getenv("ProgramFiles"), "Docker", "cli-plugins"),
|
2018-12-11 09:03:47 -05:00
|
|
|
}
|