Skip to content

Commit 0448673

Browse files
committed
Do not append []string{""} to command to preserve Docker compatibility
Signed-off-by: Andrey Klimentyev <[email protected]> (cherry picked from commit 5f3ce95) Signed-off-by: Andrey Klimentyev <[email protected]>
1 parent 9ff7280 commit 0448673

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

pkg/cri/opts/spec.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,9 @@ func WithProcessArgs(config *runtime.ContainerConfig, image *imagespec.ImageConf
6363
args = append([]string{}, image.Cmd...)
6464
}
6565
if command == nil {
66-
command = append([]string{}, image.Entrypoint...)
66+
if !(len(image.Entrypoint) == 1 && image.Entrypoint[0] == "") {
67+
command = append([]string{}, image.Entrypoint...)
68+
}
6769
}
6870
}
6971
if len(command) == 0 && len(args) == 0 {

0 commit comments

Comments
 (0)