Add no pivot root support

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
Michael Crosby 2016-03-30 14:25:42 -07:00 committed by Tonis Tiigi
parent aa976325f5
commit 47f239706c
9 changed files with 182 additions and 141 deletions

View file

@ -16,11 +16,20 @@ type StartTask struct {
Stdin string
StartResponse chan StartResponse
Labels []string
NoPivotRoot bool
}
func (s *Supervisor) start(t *StartTask) error {
start := time.Now()
container, err := runtime.New(s.stateDir, t.ID, t.BundlePath, s.runtime, s.runtimeArgs, t.Labels)
container, err := runtime.New(runtime.ContainerOpts{
Root: s.stateDir,
ID: t.ID,
Bundle: t.BundlePath,
Runtime: s.runtime,
RuntimeArgs: s.runtimeArgs,
Labels: t.Labels,
NoPivotRoot: t.NoPivotRoot,
})
if err != nil {
return err
}