Add ArgsEscaped support for CRI
This commit adds supports for the ArgsEscaped value for the image got from the dockerfile. It is used to evaluate and process the image entrypoint/cmd and container entrypoint/cmd options got from the podspec. Signed-off-by: Kirtana Ashok <Kirtana.Ashok@microsoft.com>
This commit is contained in:
@@ -35,6 +35,16 @@ func escapeAndCombineArgs(args []string) string {
|
||||
return strings.Join(escaped, " ")
|
||||
}
|
||||
|
||||
// WithProcessCommandLine replaces the command line on the generated spec
|
||||
func WithProcessCommandLine(cmdLine string) SpecOpts {
|
||||
return func(_ context.Context, _ Client, _ *containers.Container, s *Spec) error {
|
||||
setProcess(s)
|
||||
s.Process.Args = nil
|
||||
s.Process.CommandLine = cmdLine
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
// WithHostDevices adds all the hosts device nodes to the container's spec
|
||||
//
|
||||
// Not supported on windows
|
||||
|
||||
Reference in New Issue
Block a user