Wait for the container terminate at the end of CmdRun
Fixes the race condition between docker run and docker logs from #428. Upstream-commit: 3bfb70db243d35b969eba9781dec619b7c52be98 Component: engine
This commit is contained in:
committed by
Louis Opter
parent
6dd897a921
commit
d01b620bcb
@ -975,6 +975,7 @@ func (srv *Server) CmdRun(stdin io.ReadCloser, stdout rcli.DockerConn, args ...s
|
||||
}
|
||||
Debugf("Waiting for attach to return\n")
|
||||
<-attachErr
|
||||
container.Wait()
|
||||
// Expecting I/O pipe error, discarding
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user