mirror of
https://github.com/clearlinux/docker.git
synced 2026-09-05 05:01:28 +00:00
Fix server crash when running an image without command without autorun
This commit is contained in:
+1
-1
@@ -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")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user