Remove explicit unpack on all container creates
This only performs an unpack if there is an error when creating the container snapshot (and only if it's a "not found' error) since it should already be unpacked. Signed-off-by: Brian Goff <brian.goff@docker.com>
This commit is contained in:
@@ -152,13 +152,12 @@ func (c *criContainerdService) CreateContainer(ctx context.Context, r *runtime.C
|
||||
// Set snapshotter before any other options.
|
||||
opts := []containerd.NewContainerOpts{
|
||||
containerd.WithSnapshotter(c.config.ContainerdConfig.Snapshotter),
|
||||
customopts.WithImageUnpack(image.Image),
|
||||
// Prepare container rootfs. This is always writeable even if
|
||||
// the container wants a readonly rootfs since we want to give
|
||||
// the runtime (runc) a chance to modify (e.g. to create mount
|
||||
// points corresponding to spec.Mounts) before making the
|
||||
// rootfs readonly (requested by spec.Root.Readonly).
|
||||
containerd.WithNewSnapshot(id, image.Image),
|
||||
customopts.WithNewSnapshot(id, image.Image),
|
||||
}
|
||||
|
||||
if len(volumeMounts) > 0 {
|
||||
|
Reference in New Issue
Block a user