2016-03-25 19:38:00 -04:00
|
|
|
package daemon
|
|
|
|
|
|
|
|
import (
|
2016-06-21 16:42:47 -04:00
|
|
|
"github.com/spf13/pflag"
|
2016-03-25 19:38:00 -04:00
|
|
|
)
|
|
|
|
|
|
|
|
var (
|
2016-06-07 03:45:21 -04:00
|
|
|
defaultPidFile = "/system/volatile/docker/docker.pid"
|
2016-03-25 19:38:00 -04:00
|
|
|
defaultGraph = "/var/lib/docker"
|
|
|
|
defaultExec = "zones"
|
|
|
|
)
|
|
|
|
|
|
|
|
// Config defines the configuration of a docker daemon.
|
|
|
|
// These are the configuration settings that you pass
|
|
|
|
// to the docker daemon when you launch it with say: `docker -d -e lxc`
|
|
|
|
type Config struct {
|
|
|
|
CommonConfig
|
|
|
|
|
2016-06-07 03:45:21 -04:00
|
|
|
// These fields are common to all unix platforms.
|
|
|
|
CommonUnixConfig
|
2016-03-25 19:38:00 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
// bridgeConfig stores all the bridge driver specific
|
|
|
|
// configuration.
|
|
|
|
type bridgeConfig struct {
|
|
|
|
commonBridgeConfig
|
2016-06-07 03:45:21 -04:00
|
|
|
|
|
|
|
// Fields below here are platform specific.
|
|
|
|
commonUnixBridgeConfig
|
2016-03-25 19:38:00 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
// InstallFlags adds command-line options to the top-level flag parser for
|
|
|
|
// the current process.
|
2016-06-21 16:42:47 -04:00
|
|
|
func (config *Config) InstallFlags(flags *pflag.FlagSet) {
|
2016-03-25 19:38:00 -04:00
|
|
|
// First handle install flags which are consistent cross-platform
|
2016-06-21 16:42:47 -04:00
|
|
|
config.InstallCommonFlags(flags)
|
2016-03-25 19:38:00 -04:00
|
|
|
|
2016-06-07 03:45:21 -04:00
|
|
|
// Then install flags common to unix platforms
|
|
|
|
config.InstallCommonUnixFlags(flags)
|
|
|
|
|
2016-03-25 19:38:00 -04:00
|
|
|
// Then platform-specific install flags
|
2016-06-21 16:42:47 -04:00
|
|
|
config.attachExperimentalFlags(flags)
|
2016-03-25 19:38:00 -04:00
|
|
|
}
|
2016-06-14 12:13:53 -04:00
|
|
|
|
|
|
|
func (config *Config) isSwarmCompatible() error {
|
|
|
|
return nil
|
|
|
|
}
|