mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Fix checkpoint's exiting semantics.
Previously, dockerd would always ask containerd to pass --leave-running to runc/runsc, ignoring the exit boolean value. Hence, even `docker checkpoint create --leave-running=false ...` would not stop the container. Signed-off-by: Brielle Broder <bbroder@google.com>
This commit is contained in:
parent
1ef1cc8388
commit
db621eb7ee
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…
Add table
Add a link
Reference in a new issue