Refactor to new events api

Signed-off-by: Josh Horwitz <horwitzja@gmail.com>
Upstream-commit: d6bd79c18f5ab5dbdaa472ccd921ad2858117507
Component: engine
This commit is contained in:
Josh Horwitz
2016-08-09 10:34:07 -10:00
parent 46015b068c
commit 7acfbc2634
9 changed files with 194 additions and 118 deletions

View File

@ -211,10 +211,7 @@ func runRun(dockerCli *command.DockerCli, flags *pflag.FlagSet, opts *runOptions
})
}
statusChan, err := waitExitOrRemoved(dockerCli, context.Background(), createResponse.ID, hostConfig.AutoRemove)
if err != nil {
return fmt.Errorf("Error waiting container's exit code: %v", err)
}
statusChan := waitExitOrRemoved(dockerCli, ctx, createResponse.ID, hostConfig.AutoRemove)
//start the container
if err := client.ContainerStart(ctx, createResponse.ID, types.ContainerStartOptions{}); err != nil {