|
@@ -15,6 +15,25 @@ const (
|
|
DefaultIpcMode = "private"
|
|
DefaultIpcMode = "private"
|
|
)
|
|
)
|
|
|
|
|
|
|
|
+// BridgeConfig stores all the bridge driver specific
|
|
|
|
+// configuration.
|
|
|
|
+type BridgeConfig struct {
|
|
|
|
+ commonBridgeConfig
|
|
|
|
+
|
|
|
|
+ // These fields are common to all unix platforms.
|
|
|
|
+ commonUnixBridgeConfig
|
|
|
|
+
|
|
|
|
+ // Fields below here are platform specific.
|
|
|
|
+ EnableIPv6 bool `json:"ipv6,omitempty"`
|
|
|
|
+ EnableIPTables bool `json:"iptables,omitempty"`
|
|
|
|
+ EnableIP6Tables bool `json:"ip6tables,omitempty"`
|
|
|
|
+ EnableIPForward bool `json:"ip-forward,omitempty"`
|
|
|
|
+ EnableIPMasq bool `json:"ip-masq,omitempty"`
|
|
|
|
+ EnableUserlandProxy bool `json:"userland-proxy,omitempty"`
|
|
|
|
+ UserlandProxyPath string `json:"userland-proxy-path,omitempty"`
|
|
|
|
+ FixedCIDRv6 string `json:"fixed-cidr-v6,omitempty"`
|
|
|
|
+}
|
|
|
|
+
|
|
// Config defines the configuration of a docker daemon.
|
|
// Config defines the configuration of a docker daemon.
|
|
// It includes json tags to deserialize configuration from a file
|
|
// It includes json tags to deserialize configuration from a file
|
|
// using the same names that the flags in the command line uses.
|
|
// using the same names that the flags in the command line uses.
|
|
@@ -43,25 +62,6 @@ type Config struct {
|
|
Rootless bool `json:"rootless,omitempty"`
|
|
Rootless bool `json:"rootless,omitempty"`
|
|
}
|
|
}
|
|
|
|
|
|
-// BridgeConfig stores all the bridge driver specific
|
|
|
|
-// configuration.
|
|
|
|
-type BridgeConfig struct {
|
|
|
|
- commonBridgeConfig
|
|
|
|
-
|
|
|
|
- // These fields are common to all unix platforms.
|
|
|
|
- commonUnixBridgeConfig
|
|
|
|
-
|
|
|
|
- // Fields below here are platform specific.
|
|
|
|
- EnableIPv6 bool `json:"ipv6,omitempty"`
|
|
|
|
- EnableIPTables bool `json:"iptables,omitempty"`
|
|
|
|
- EnableIP6Tables bool `json:"ip6tables,omitempty"`
|
|
|
|
- EnableIPForward bool `json:"ip-forward,omitempty"`
|
|
|
|
- EnableIPMasq bool `json:"ip-masq,omitempty"`
|
|
|
|
- EnableUserlandProxy bool `json:"userland-proxy,omitempty"`
|
|
|
|
- UserlandProxyPath string `json:"userland-proxy-path,omitempty"`
|
|
|
|
- FixedCIDRv6 string `json:"fixed-cidr-v6,omitempty"`
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
// IsSwarmCompatible defines if swarm mode can be enabled in this config
|
|
// IsSwarmCompatible defines if swarm mode can be enabled in this config
|
|
func (conf *Config) IsSwarmCompatible() error {
|
|
func (conf *Config) IsSwarmCompatible() error {
|
|
if conf.ClusterStore != "" || conf.ClusterAdvertise != "" {
|
|
if conf.ClusterStore != "" || conf.ClusterAdvertise != "" {
|
|
@@ -104,7 +104,7 @@ func (conf *Config) ValidatePlatformConfig() error {
|
|
return verifyDefaultCgroupNsMode(conf.CgroupNamespaceMode)
|
|
return verifyDefaultCgroupNsMode(conf.CgroupNamespaceMode)
|
|
}
|
|
}
|
|
|
|
|
|
-// IsRootless returns conf.Rootless
|
|
|
|
|
|
+// IsRootless returns conf.Rootless on Linux but false on Windows
|
|
func (conf *Config) IsRootless() bool {
|
|
func (conf *Config) IsRootless() bool {
|
|
return conf.Rootless
|
|
return conf.Rootless
|
|
}
|
|
}
|