2017-01-23 06:23:07 -05:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"os"
|
|
|
|
"path/filepath"
|
|
|
|
|
|
|
|
"github.com/docker/docker/daemon/config"
|
|
|
|
"github.com/spf13/pflag"
|
|
|
|
)
|
|
|
|
|
|
|
|
var (
|
2016-11-22 01:17:24 -05:00
|
|
|
defaultPidFile string
|
|
|
|
defaultDataRoot = filepath.Join(os.Getenv("programdata"), "docker")
|
2017-09-22 09:52:41 -04:00
|
|
|
defaultExecRoot = filepath.Join(os.Getenv("programdata"), "docker", "exec-root")
|
2017-01-23 06:23:07 -05:00
|
|
|
)
|
|
|
|
|
|
|
|
// installConfigFlags adds flags to the pflag.FlagSet to configure the daemon
|
|
|
|
func installConfigFlags(conf *config.Config, flags *pflag.FlagSet) {
|
|
|
|
// First handle install flags which are consistent cross-platform
|
|
|
|
installCommonConfigFlags(conf, flags)
|
|
|
|
|
|
|
|
// 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")
|
|
|
|
}
|