Merge pull request #232 from Random-Liu/fix-rootfs

Use `WithNewSnapshot` for sandbox container.
This commit is contained in:
Lantao Liu 2017-09-08 21:45:23 -07:00 committed by GitHub
commit 159fa903cf

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)}