config_windows.go 2.1 KB

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