|
@@ -24,19 +24,16 @@ func newDaemonCommand() *cobra.Command {
|
|
|
SilenceErrors: true,
|
|
|
Args: cli.NoArgs,
|
|
|
RunE: func(cmd *cobra.Command, args []string) error {
|
|
|
- if opts.version {
|
|
|
- showVersion()
|
|
|
- return nil
|
|
|
- }
|
|
|
opts.flags = cmd.Flags()
|
|
|
return runDaemon(opts)
|
|
|
},
|
|
|
DisableFlagsInUseLine: true,
|
|
|
+ Version: fmt.Sprintf("%s, build %s", dockerversion.Version, dockerversion.GitCommit),
|
|
|
}
|
|
|
cli.SetupRootCommand(cmd)
|
|
|
|
|
|
flags := cmd.Flags()
|
|
|
- flags.BoolVarP(&opts.version, "version", "v", false, "Print version information and quit")
|
|
|
+ flags.BoolP("version", "v", false, "Print version information and quit")
|
|
|
flags.StringVar(&opts.configFile, "config-file", defaultDaemonConfigFile, "Daemon configuration file")
|
|
|
opts.InstallFlags(flags)
|
|
|
installConfigFlags(opts.daemonConfig, flags)
|
|
@@ -45,10 +42,6 @@ func newDaemonCommand() *cobra.Command {
|
|
|
return cmd
|
|
|
}
|
|
|
|
|
|
-func showVersion() {
|
|
|
- fmt.Printf("Docker version %s, build %s\n", dockerversion.Version, dockerversion.GitCommit)
|
|
|
-}
|
|
|
-
|
|
|
func main() {
|
|
|
if reexec.Init() {
|
|
|
return
|