From 6b0864434ad2780160c06ba607c76b0325b60175 Mon Sep 17 00:00:00 2001 From: Qi Wang Date: Fri, 21 Aug 2020 13:56:50 -0400 Subject: Add global options --runtime-flags Add global options --runtime-flags for setting options to container runtime. Signed-off-by: Qi Wang --- libpod/runtime.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'libpod/runtime.go') diff --git a/libpod/runtime.go b/libpod/runtime.go index 1d2e624d8..fdd9ebcc8 100644 --- a/libpod/runtime.go +++ b/libpod/runtime.go @@ -53,6 +53,7 @@ type Runtime struct { imageContext *types.SystemContext defaultOCIRuntime OCIRuntime ociRuntimes map[string]OCIRuntime + runtimeFlags []string netPlugin ocicni.CNIPlugin conmonPath string imageRuntime *image.Runtime @@ -365,7 +366,7 @@ func makeRuntime(ctx context.Context, runtime *Runtime) (retErr error) { // Initialize remaining OCI runtimes for name, paths := range runtime.config.Engine.OCIRuntimes { - ociRuntime, err := newConmonOCIRuntime(name, paths, runtime.conmonPath, runtime.config) + ociRuntime, err := newConmonOCIRuntime(name, paths, runtime.conmonPath, runtime.runtimeFlags, runtime.config) if err != nil { // Don't fatally error. // This will allow us to ship configs including optional @@ -385,7 +386,7 @@ func makeRuntime(ctx context.Context, runtime *Runtime) (retErr error) { if strings.HasPrefix(runtime.config.Engine.OCIRuntime, "/") { name := filepath.Base(runtime.config.Engine.OCIRuntime) - ociRuntime, err := newConmonOCIRuntime(name, []string{runtime.config.Engine.OCIRuntime}, runtime.conmonPath, runtime.config) + ociRuntime, err := newConmonOCIRuntime(name, []string{runtime.config.Engine.OCIRuntime}, runtime.conmonPath, runtime.runtimeFlags, runtime.config) if err != nil { return err } -- cgit v1.2.3-54-g00ecf