From 3b37101c6e3679399a5ed05bb2e109df0e0032e8 Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Mon, 7 Jan 2019 08:46:13 +0100 Subject: config: store the runtime used to create each container Signed-off-by: Giuseppe Scrivano --- libpod/container.go | 3 +++ libpod/runtime_ctr.go | 2 ++ 2 files changed, 5 insertions(+) diff --git a/libpod/container.go b/libpod/container.go index ca83bbffe..95f7a2972 100644 --- a/libpod/container.go +++ b/libpod/container.go @@ -350,6 +350,9 @@ type ContainerConfig struct { PostConfigureNetNS bool `json:"postConfigureNetNS"` + // OCIRuntime used to create the container + OCIRuntime string `json:"runtime,omitempty"` + // ExitCommand is the container's exit command. // This Command will be executed when the container exits ExitCommand []string `json:"exitCommand,omitempty"` diff --git a/libpod/runtime_ctr.go b/libpod/runtime_ctr.go index ab79fe5fb..68599fe6d 100644 --- a/libpod/runtime_ctr.go +++ b/libpod/runtime_ctr.go @@ -62,6 +62,8 @@ func (r *Runtime) newContainer(ctx context.Context, rSpec *spec.Spec, options .. ctr.config.StopTimeout = CtrRemoveTimeout + ctr.config.OCIRuntime = r.config.OCIRuntime + // Set namespace based on current runtime namespace // Do so before options run so they can override it if r.config.Namespace != "" { -- cgit v1.2.3-54-g00ecf