diff --git a/cli/command/container/run.go b/cli/command/container/run.go index dcf9dca9f2..f538c04a1d 100644 --- a/cli/command/container/run.go +++ b/cli/command/container/run.go @@ -308,7 +308,8 @@ func runStartContainerErr(err error) error { strings.Contains(trimmedErr, "no such file or directory") || strings.Contains(trimmedErr, "system cannot find the file specified") { statusError = cli.StatusError{StatusCode: 127} - } else if strings.Contains(trimmedErr, syscall.EACCES.Error()) { + } else if strings.Contains(trimmedErr, syscall.EACCES.Error()) || + strings.Contains(trimmedErr, syscall.EISDIR.Error()) { statusError = cli.StatusError{StatusCode: 126} }