Use WithNewSnapshot for sandbox container.

Signed-off-by: Lantao Liu <lantaol@google.com>
This commit is contained in:
Lantao Liu 2017-09-09 03:59:44 +00:00
parent 09ecd7865b
commit c4846745d6

View File

@ -132,10 +132,7 @@ func (c *criContainerdService) RunPodSandbox(ctx context.Context, r *runtime.Run
} }
opts := []containerd.NewContainerOpts{ opts := []containerd.NewContainerOpts{
containerd.WithSnapshotter(c.snapshotter), containerd.WithSnapshotter(c.snapshotter),
// A pure ro rootfs view is OK for the sandbox since containerd.WithNewSnapshot(id, image.Image),
// we will never need to modify it or mount anything
// in it.
containerd.WithNewSnapshotView(id, image.Image),
containerd.WithSpec(spec, specOpts...), containerd.WithSpec(spec, specOpts...),
containerd.WithContainerLabels(labels), containerd.WithContainerLabels(labels),
containerd.WithRuntime(defaultRuntime, nil)} containerd.WithRuntime(defaultRuntime, nil)}