mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
cmd/dockerd: move storage-driver flag to unix-only file
The installCommonConfigFlags() function is meant for flags that are supported by all platforms, so removing it from that function. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
2b1dcf4cbf
commit
0ff0b8693e
2 changed files with 1 additions and 7 deletions
|
@ -1,8 +1,6 @@
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"runtime"
|
|
||||||
|
|
||||||
"github.com/docker/docker/daemon/config"
|
"github.com/docker/docker/daemon/config"
|
||||||
"github.com/docker/docker/opts"
|
"github.com/docker/docker/opts"
|
||||||
"github.com/docker/docker/registry"
|
"github.com/docker/docker/registry"
|
||||||
|
@ -48,11 +46,6 @@ func installCommonConfigFlags(conf *config.Config, flags *pflag.FlagSet) error {
|
||||||
flags.BoolVarP(&conf.AutoRestart, "restart", "r", true, "--restart on the daemon has been deprecated in favor of --restart policies on docker run")
|
flags.BoolVarP(&conf.AutoRestart, "restart", "r", true, "--restart on the daemon has been deprecated in favor of --restart policies on docker run")
|
||||||
_ = flags.MarkDeprecated("restart", "Please use a restart policy on docker run")
|
_ = flags.MarkDeprecated("restart", "Please use a restart policy on docker run")
|
||||||
|
|
||||||
// Windows doesn't support setting the storage driver - there is no choice as to which ones to use.
|
|
||||||
if runtime.GOOS != "windows" {
|
|
||||||
flags.StringVarP(&conf.GraphDriver, "storage-driver", "s", "", "Storage driver to use")
|
|
||||||
}
|
|
||||||
|
|
||||||
flags.IntVar(&conf.Mtu, "mtu", 0, "Set the containers network MTU")
|
flags.IntVar(&conf.Mtu, "mtu", 0, "Set the containers network MTU")
|
||||||
flags.BoolVar(&conf.RawLogs, "raw-logs", false, "Full timestamps without ANSI coloring")
|
flags.BoolVar(&conf.RawLogs, "raw-logs", false, "Full timestamps without ANSI coloring")
|
||||||
flags.Var(opts.NewListOptsRef(&conf.DNS, opts.ValidateIPAddress), "dns", "DNS server to use")
|
flags.Var(opts.NewListOptsRef(&conf.DNS, opts.ValidateIPAddress), "dns", "DNS server to use")
|
||||||
|
|
|
@ -35,6 +35,7 @@ func installConfigFlags(conf *config.Config, flags *pflag.FlagSet) error {
|
||||||
conf.ShmSize = opts.MemBytes(config.DefaultShmSize)
|
conf.ShmSize = opts.MemBytes(config.DefaultShmSize)
|
||||||
|
|
||||||
// Then platform-specific install flags
|
// Then platform-specific install flags
|
||||||
|
flags.StringVarP(&conf.GraphDriver, "storage-driver", "s", "", "Storage driver to use")
|
||||||
flags.BoolVar(&conf.EnableSelinuxSupport, "selinux-enabled", false, "Enable selinux support")
|
flags.BoolVar(&conf.EnableSelinuxSupport, "selinux-enabled", false, "Enable selinux support")
|
||||||
flags.Var(opts.NewNamedUlimitOpt("default-ulimits", &conf.Ulimits), "default-ulimit", "Default ulimits for containers")
|
flags.Var(opts.NewNamedUlimitOpt("default-ulimits", &conf.Ulimits), "default-ulimit", "Default ulimits for containers")
|
||||||
flags.BoolVar(&conf.BridgeConfig.EnableIPTables, "iptables", true, "Enable addition of iptables rules")
|
flags.BoolVar(&conf.BridgeConfig.EnableIPTables, "iptables", true, "Enable addition of iptables rules")
|
||||||
|
|
Loading…
Reference in a new issue