2017-01-23 06:23:07 -05:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"os"
|
|
|
|
"path/filepath"
|
|
|
|
|
|
|
|
"github.com/docker/docker/daemon/config"
|
|
|
|
"github.com/spf13/pflag"
|
|
|
|
)
|
|
|
|
|
2018-10-15 03:52:53 -04:00
|
|
|
func getDefaultPidFile() (string, error) {
|
|
|
|
return "", nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func getDefaultDataRoot() (string, error) {
|
|
|
|
return filepath.Join(os.Getenv("programdata"), "docker"), nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func getDefaultExecRoot() (string, error) {
|
|
|
|
return filepath.Join(os.Getenv("programdata"), "docker", "exec-root"), nil
|
|
|
|
}
|
2017-01-23 06:23:07 -05:00
|
|
|
|
|
|
|
// installConfigFlags adds flags to the pflag.FlagSet to configure the daemon
|
2018-10-15 03:52:53 -04:00
|
|
|
func installConfigFlags(conf *config.Config, flags *pflag.FlagSet) error {
|
2017-01-23 06:23:07 -05:00
|
|
|
// First handle install flags which are consistent cross-platform
|
2018-10-15 03:52:53 -04:00
|
|
|
if err := installCommonConfigFlags(conf, flags); err != nil {
|
|
|
|
return err
|
|
|
|
}
|
2017-01-23 06:23:07 -05:00
|
|
|
|
|
|
|
// Then platform-specific install flags.
|
|
|
|
flags.StringVar(&conf.BridgeConfig.FixedCIDR, "fixed-cidr", "", "IPv4 subnet for fixed IPs")
|
|
|
|
flags.StringVarP(&conf.BridgeConfig.Iface, "bridge", "b", "", "Attach containers to a virtual switch")
|
|
|
|
flags.StringVarP(&conf.SocketGroup, "group", "G", "", "Users or groups that can access the named pipe")
|
2018-10-15 03:52:53 -04:00
|
|
|
return nil
|
2017-01-23 06:23:07 -05:00
|
|
|
}
|
2022-03-25 11:21:45 -04:00
|
|
|
|
|
|
|
// configureCertsDir configures registry.CertsDir() depending on if the daemon
|
|
|
|
// is running in rootless mode or not. On Windows, it is a no-op.
|
|
|
|
func configureCertsDir() {}
|