1
0
Fork 0
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:
Sebastiaan van Stijn 2018-07-26 14:25:49 +02:00 committed by GitHub
commit c3a0207714
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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