Show container wait error
If container wait has failed, show an error from the engine
and return an appropriate exit code.
This requires engine changes from
@@ -37,7 +37,12 @@ func waitExitOrRemoved(ctx context.Context, dockerCli command.Cli, containerID s
go func() {
select {
case result := <-resultC:
+ if result.Error != nil {
+ logrus.Errorf("Error waiting for container: %v", result.Error.Message)
+ statusC <- 125
+ } else {
statusC <- int(result.StatusCode)
+ }
case err := <-errC:
logrus.Errorf("error waiting for container: %v", err)
statusC <- 125
