mirror of https://github.com/docker/cli.git
cli/command/container: RunStart: inline variable
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
4f67ff8e1f
commit
0b7c72c3ba
|
@ -146,13 +146,13 @@ func RunStart(dockerCli command.Cli, opts *StartOptions) error {
|
||||||
// 3. We should open a channel for receiving status code of the container
|
// 3. We should open a channel for receiving status code of the container
|
||||||
// no matter it's detached, removed on daemon side(--rm) or exit normally.
|
// no matter it's detached, removed on daemon side(--rm) or exit normally.
|
||||||
statusChan := waitExitOrRemoved(ctx, dockerCli, c.ID, c.HostConfig.AutoRemove)
|
statusChan := waitExitOrRemoved(ctx, dockerCli, c.ID, c.HostConfig.AutoRemove)
|
||||||
startOptions := types.ContainerStartOptions{
|
|
||||||
CheckpointID: opts.Checkpoint,
|
|
||||||
CheckpointDir: opts.CheckpointDir,
|
|
||||||
}
|
|
||||||
|
|
||||||
// 4. Start the container.
|
// 4. Start the container.
|
||||||
if err := dockerCli.Client().ContainerStart(ctx, c.ID, startOptions); err != nil {
|
err = dockerCli.Client().ContainerStart(ctx, c.ID, types.ContainerStartOptions{
|
||||||
|
CheckpointID: opts.Checkpoint,
|
||||||
|
CheckpointDir: opts.CheckpointDir,
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
cancelFun()
|
cancelFun()
|
||||||
<-cErr
|
<-cErr
|
||||||
if c.HostConfig.AutoRemove {
|
if c.HostConfig.AutoRemove {
|
||||||
|
|
Loading…
Reference in New Issue