From e6dd1bf4aa6beff1361de84dbde531610e16ee7d Mon Sep 17 00:00:00 2001 From: "Guillaume J. Charmes" Date: Thu, 2 May 2013 13:56:45 -0700 Subject: [PATCH] Fix server crash when running an image without command without autorun Upstream-commit: 64d7bc442daa012683b38183c71674b9ecd660c2 Component: engine --- components/engine/runtime.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/engine/runtime.go b/components/engine/runtime.go index 7ad0c395e8..b246f74a5c 100644 --- a/components/engine/runtime.go +++ b/components/engine/runtime.go @@ -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") }