7 "github.com/containerd/containerd/runtime"
8 "golang.org/x/net/context"
11 // StartTask holds needed parameters to create a new container
12 type StartTask struct {
19 StartResponse chan StartResponse
22 Checkpoint *runtime.Checkpoint
29 func (s *Supervisor) start(t *StartTask) error {
32 rtArgs := s.runtimeArgs
35 rtArgs = t.RuntimeArgs
37 container, err := runtime.New(runtime.ContainerOpts{
45 NoPivotRoot: t.NoPivotRoot,
51 s.containers[t.ID] = &containerInfo{
54 ContainersCounter.Inc(1)
58 StartResponse: t.StartResponse,
64 if t.Checkpoint != nil {
65 task.CheckpointPath = filepath.Join(t.CheckpointDir, t.Checkpoint.Name)
69 ContainerCreateTimer.UpdateSince(start)
70 return errDeferredResponse