config: store the runtime used to create each container

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
Giuseppe Scrivano
2019-01-07 08:46:13 +01:00
parent 50c86ae389
commit 3b37101c6e
2 changed files with 5 additions and 0 deletions

View File

@ -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"`

View File

@ -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 != "" {