Fix exec form of HEALTHCHECK CMD
We attached the JSON flag to the wrong AST node, causing Docker to treat the exec form ["binary", "arg"] as if the shell form "binary arg" had been used. This failed if "ls" was not present. Added a test to detect this. Fixes #26174 Signed-off-by: Thomas Leonard <thomas.leonard@docker.com> Upstream-commit: e95b6b51daed868094c7b66113381d5088e831b4 Component: engine
This commit is contained in:
@ -357,5 +357,5 @@ func parseHealthConfig(rest string, d *Directive) (*Node, map[string]bool, error
|
||||
return nil, nil, err
|
||||
}
|
||||
|
||||
return &Node{Value: typ, Next: cmd, Attributes: attrs}, nil, err
|
||||
return &Node{Value: typ, Next: cmd}, attrs, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user