1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Fix server crash when running an image without command without autorun

This commit is contained in:
Guillaume J. Charmes 2013-05-02 13:56:45 -07:00
parent 8378498951
commit 64d7bc442d

View file

@ -127,7 +127,7 @@ func (runtime *Runtime) Create(config *Config) (*Container, error) {
runtime.mergeConfig(config, img.Config)
}
if config.Cmd == nil {
if config.Cmd == nil || len(config.Cmd) < 2 {
return nil, fmt.Errorf("No command specified")
}