diff --git a/cli/command/container/run.go b/cli/command/container/run.go index c7aa60d6ab..a8aeae5350 100644 --- a/cli/command/container/run.go +++ b/cli/command/container/run.go @@ -290,8 +290,11 @@ func attachContainer( return nil, errAttach } + ch := make(chan error, 1) + *errCh = ch + go func() { - *errCh <- func() error { + ch <- func() error { streamer := hijackedIOStreamer{ streams: dockerCli, inputStream: in,