config_windows.go 1.0 KB

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