Do not append []string{""} to command to preserve Docker compatibility

Signed-off-by: Andrey Klimentyev <andrey.klimentyev@flant.com>
This commit is contained in:
Andrey Klimentyev 2021-03-29 13:36:24 +03:00
parent eaf286224b
commit 5f3ce9512b

View File

@ -63,7 +63,9 @@ func WithProcessArgs(config *runtime.ContainerConfig, image *imagespec.ImageConf
args = append([]string{}, image.Cmd...) args = append([]string{}, image.Cmd...)
} }
if command == nil { if command == nil {
command = append([]string{}, image.Entrypoint...) if !(len(image.Entrypoint) == 1 && image.Entrypoint[0] == "") {
command = append([]string{}, image.Entrypoint...)
}
} }
} }
if len(command) == 0 && len(args) == 0 { if len(command) == 0 && len(args) == 0 {