From cfe7cb61c6eb9c17e89944ad2d1d8a7be2eca8b2 Mon Sep 17 00:00:00 2001 From: Tonis Tiigi Date: Wed, 16 Nov 2016 13:19:45 -0800 Subject: [PATCH] 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 Upstream-commit: 28f8f9296320580da26628fcd2f7adf46c4a033c Component: cli --- components/cli/docker.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/components/cli/docker.go b/components/cli/docker.go index 02d2918f0c..e6b5048564 100644 --- a/components/cli/docker.go +++ b/components/cli/docker.go @@ -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)