config_windows.go 903 B

1234567891011121314151617181920212223242526
  1. package main
  2. import (
  3. "os"
  4. "path/filepath"
  5. "github.com/docker/docker/daemon/config"
  6. "github.com/spf13/pflag"
  7. )
  8. var (
  9. defaultPidFile string
  10. defaultDataRoot = filepath.Join(os.Getenv("programdata"), "docker")
  11. defaultExecRoot = filepath.Join(os.Getenv("programdata"), "docker", "exec-root")
  12. )
  13. // installConfigFlags adds flags to the pflag.FlagSet to configure the daemon
  14. func installConfigFlags(conf *config.Config, flags *pflag.FlagSet) {
  15. // First handle install flags which are consistent cross-platform
  16. installCommonConfigFlags(conf, flags)
  17. // Then platform-specific install flags.
  18. flags.StringVar(&conf.BridgeConfig.FixedCIDR, "fixed-cidr", "", "IPv4 subnet for fixed IPs")
  19. flags.StringVarP(&conf.BridgeConfig.Iface, "bridge", "b", "", "Attach containers to a virtual switch")
  20. flags.StringVarP(&conf.SocketGroup, "group", "G", "", "Users or groups that can access the named pipe")
  21. }