config_windows.go 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. package daemon
  2. import (
  3. "os"
  4. "path/filepath"
  5. "github.com/docker/docker/api/types"
  6. "github.com/spf13/pflag"
  7. )
  8. var (
  9. defaultPidFile string
  10. defaultGraph = filepath.Join(os.Getenv("programdata"), "docker")
  11. )
  12. // bridgeConfig stores all the bridge driver specific
  13. // configuration.
  14. type bridgeConfig struct {
  15. commonBridgeConfig
  16. }
  17. // Config defines the configuration of a docker daemon.
  18. // These are the configuration settings that you pass
  19. // to the docker daemon when you launch it with say: `docker daemon -e windows`
  20. type Config struct {
  21. CommonConfig
  22. // Fields below here are platform specific. (There are none presently
  23. // for the Windows daemon.)
  24. }
  25. // InstallFlags adds flags to the pflag.FlagSet to configure the daemon
  26. func (config *Config) InstallFlags(flags *pflag.FlagSet) {
  27. // First handle install flags which are consistent cross-platform
  28. config.InstallCommonFlags(flags)
  29. // Then platform-specific install flags.
  30. flags.StringVar(&config.bridgeConfig.FixedCIDR, "fixed-cidr", "", "IPv4 subnet for fixed IPs")
  31. flags.StringVarP(&config.bridgeConfig.Iface, "bridge", "b", "", "Attach containers to a virtual switch")
  32. flags.StringVarP(&config.SocketGroup, "group", "G", "", "Users or groups that can access the named pipe")
  33. }
  34. // GetRuntime returns the runtime path and arguments for a given
  35. // runtime name
  36. func (config *Config) GetRuntime(name string) *types.Runtime {
  37. return nil
  38. }
  39. // GetInitPath returns the configure docker-init path
  40. func (config *Config) GetInitPath() string {
  41. return ""
  42. }
  43. // GetDefaultRuntimeName returns the current default runtime
  44. func (config *Config) GetDefaultRuntimeName() string {
  45. return stockRuntimeName
  46. }
  47. // GetAllRuntimes returns a copy of the runtimes map
  48. func (config *Config) GetAllRuntimes() map[string]types.Runtime {
  49. return map[string]types.Runtime{}
  50. }
  51. // GetExecRoot returns the user configured Exec-root
  52. func (config *Config) GetExecRoot() string {
  53. return ""
  54. }
  55. func (config *Config) isSwarmCompatible() error {
  56. return nil
  57. }