ctr: Properly delete snapshot if run is called with --rm

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
This commit is contained in:
Kenfe-Mickael Laventure 2017-06-23 18:01:01 -07:00
parent 6574055dec
commit 5a02ae929c
No known key found for this signature in database
GPG Key ID: 40CF16616B361216

View File

@ -111,7 +111,7 @@ var runCommand = cli.Command{
return err return err
} }
if context.Bool("rm") { if context.Bool("rm") {
defer container.Delete(ctx) defer container.Delete(ctx, containerd.WithRootFSDeletion)
} }
task, err := newTask(ctx, container, checkpointIndex, tty) task, err := newTask(ctx, container, checkpointIndex, tty)
if err != nil { if err != nil {