Wait for the container terminate at the end of CmdRun
Fixes the race condition between docker run and docker logs from #428.
This commit is contained in:
parent
d8416539b3
commit
3bfb70db24
1 changed files with 1 additions and 0 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue