Calling StartExec (even without Detach: true) will not wait until the process finishes if stdout/stderr are not passed in. IIUC the problem is this branch:
|
if hijackOptions.stdout == nil && hijackOptions.stderr == nil { |
|
close(errChanOut) |
I believe the fix is to always use ioutil.Discard for stdout/stderr and synchronize on the streams closing.
Calling
StartExec(even withoutDetach: true) will not wait until the process finishes if stdout/stderr are not passed in. IIUC the problem is this branch:go-dockerclient/client.go
Lines 793 to 794 in fa0591b
I believe the fix is to always use
ioutil.Discardfor stdout/stderr and synchronize on the streams closing.