mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Improve no command handling
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
This commit is contained in:
parent
8228e50581
commit
4482115840
1 changed files with 1 additions and 3 deletions
|
@ -378,9 +378,7 @@ func (runtime *Runtime) Create(config *Config, name string) (*Container, []strin
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if len(config.Entrypoint) != 0 && config.Cmd == nil {
|
if len(config.Entrypoint) == 0 && len(config.Cmd) == 0 {
|
||||||
config.Cmd = []string{}
|
|
||||||
} else if config.Cmd == nil || len(config.Cmd) == 0 {
|
|
||||||
return nil, nil, fmt.Errorf("No command specified")
|
return nil, nil, fmt.Errorf("No command specified")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue