Skip cli initialization for daemon command

Cli initialization pings back to remote API and
creates a deadlock if socket is already being
listened by systemd.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 5b0a52f7dcd04017a1def7326f8adbb8547ebe89
Component: engine
This commit is contained in:
Tonis Tiigi
2016-11-16 13:19:45 -08:00
parent 73004a6b58
commit 43c58c892c
+4
View File
@@ -39,6 +39,10 @@ func newDockerCommand(dockerCli *command.DockerCli) *cobra.Command {
return nil
},
PersistentPreRunE: func(cmd *cobra.Command, args []string) error {
// daemon command is special, we redirect directly to another binary
if cmd.Name() == "daemon" {
return nil
}
// flags must be the top-level command flags, not cmd.Flags()
opts.Common.SetDefaultOptions(flags)
dockerPreRun(opts)