mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
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>
This commit is contained in:
parent
77fca662dd
commit
5b0a52f7dc
1 changed files with 4 additions and 0 deletions
|
@ -39,6 +39,10 @@ func newDockerCommand(dockerCli *command.DockerCli) *cobra.Command {
|
||||||
return nil
|
return nil
|
||||||
},
|
},
|
||||||
PersistentPreRunE: func(cmd *cobra.Command, args []string) error {
|
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()
|
// flags must be the top-level command flags, not cmd.Flags()
|
||||||
opts.Common.SetDefaultOptions(flags)
|
opts.Common.SetDefaultOptions(flags)
|
||||||
dockerPreRun(opts)
|
dockerPreRun(opts)
|
||||||
|
|
Loading…
Reference in a new issue