Skip to content

Commit

Permalink
Do not append []string{""} to command to preserve Docker compatibility
Browse files Browse the repository at this point in the history
Signed-off-by: Andrey Klimentyev <andrey.klimentyev@flant.com>
(cherry picked from commit 5f3ce95)
Signed-off-by: Andrey Klimentyev <andrey.klimentyev@flant.com>
  • Loading branch information
zuzzas committed Aug 16, 2022
1 parent 9ff7280 commit 0448673
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/cri/opts/spec.go
Expand Up @@ -63,7 +63,9 @@ func WithProcessArgs(config *runtime.ContainerConfig, image *imagespec.ImageConf
args = append([]string{}, image.Cmd...)
}
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 {
Expand Down

0 comments on commit 0448673

Please sign in to comment.