Allow specifying runtime to be used when creating container (#247)
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
This commit is contained in:
parent
62e1370f91
commit
126e5c403e
4 changed files with 198 additions and 157 deletions
|
@ -17,16 +17,24 @@ type StartTask struct {
|
|||
Labels []string
|
||||
NoPivotRoot bool
|
||||
Checkpoint *runtime.Checkpoint
|
||||
Runtime string
|
||||
RuntimeArgs []string
|
||||
}
|
||||
|
||||
func (s *Supervisor) start(t *StartTask) error {
|
||||
start := time.Now()
|
||||
rt := s.runtime
|
||||
rtArgs := s.runtimeArgs
|
||||
if t.Runtime != "" {
|
||||
rt = t.Runtime
|
||||
rtArgs = t.RuntimeArgs
|
||||
}
|
||||
container, err := runtime.New(runtime.ContainerOpts{
|
||||
Root: s.stateDir,
|
||||
ID: t.ID,
|
||||
Bundle: t.BundlePath,
|
||||
Runtime: s.runtime,
|
||||
RuntimeArgs: s.runtimeArgs,
|
||||
Runtime: rt,
|
||||
RuntimeArgs: rtArgs,
|
||||
Shim: s.shim,
|
||||
Labels: t.Labels,
|
||||
NoPivotRoot: t.NoPivotRoot,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue