Do not append []string{""} to command to preserve Docker compatibility
Signed-off-by: Andrey Klimentyev <andrey.klimentyev@flant.com>
This commit is contained in:
parent
eaf286224b
commit
5f3ce9512b
@ -63,9 +63,11 @@ func WithProcessArgs(config *runtime.ContainerConfig, image *imagespec.ImageConf
|
||||
args = append([]string{}, image.Cmd...)
|
||||
}
|
||||
if command == nil {
|
||||
if !(len(image.Entrypoint) == 1 && image.Entrypoint[0] == "") {
|
||||
command = append([]string{}, image.Entrypoint...)
|
||||
}
|
||||
}
|
||||
}
|
||||
if len(command) == 0 && len(args) == 0 {
|
||||
return errors.New("no command specified")
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user