client: rename rootfs to snapshot in "With" functions
Clarify terminology around functions which use and create snapshots for containers. Signed-off-by: Derek McGowan <derek@mcgstyle.net>
This commit is contained in:
@@ -26,7 +26,7 @@ var deleteCommand = cli.Command{
|
||||
}
|
||||
deleteOpts := []containerd.DeleteOpts{}
|
||||
if !context.Bool("keep-snapshot") {
|
||||
deleteOpts = append(deleteOpts, containerd.WithRootFSDeletion)
|
||||
deleteOpts = append(deleteOpts, containerd.WithSnapshotCleanup)
|
||||
}
|
||||
container, err := client.LoadContainer(ctx, context.Args().First())
|
||||
if err != nil {
|
||||
|
||||
@@ -119,7 +119,7 @@ var runCommand = cli.Command{
|
||||
return err
|
||||
}
|
||||
if context.Bool("rm") {
|
||||
defer container.Delete(ctx, containerd.WithRootFSDeletion)
|
||||
defer container.Delete(ctx, containerd.WithSnapshotCleanup)
|
||||
}
|
||||
task, err := newTask(ctx, container, checkpointIndex, tty)
|
||||
if err != nil {
|
||||
|
||||
@@ -97,9 +97,9 @@ func newContainer(ctx gocontext.Context, client *containerd.Client, context *cli
|
||||
}
|
||||
var rootfs containerd.NewContainerOpts
|
||||
if context.Bool("readonly") {
|
||||
rootfs = containerd.WithNewReadonlyRootFS(id, image)
|
||||
rootfs = containerd.WithNewSnapshotView(id, image)
|
||||
} else {
|
||||
rootfs = containerd.WithNewRootFS(id, image)
|
||||
rootfs = containerd.WithNewSnapshot(id, image)
|
||||
}
|
||||
|
||||
return client.NewContainer(ctx, id,
|
||||
|
||||
Reference in New Issue
Block a user