mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #37360 from bjbroder/checkpoint-exit
Fix checkpoint's exiting semantics.
This commit is contained in:
commit
c3a0207714
1 changed files with 5 additions and 1 deletions
|
@ -561,7 +561,11 @@ func (c *client) CreateCheckpoint(ctx context.Context, containerID, checkpointDi
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
img, err := p.(containerd.Task).Checkpoint(ctx)
|
opts := []containerd.CheckpointTaskOpts{}
|
||||||
|
if exit {
|
||||||
|
opts = append(opts, containerd.WithExit)
|
||||||
|
}
|
||||||
|
img, err := p.(containerd.Task).Checkpoint(ctx, opts...)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return wrapError(err)
|
return wrapError(err)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue