When a docker layer has a gzip error, read after error
MultiWriter requires that all writers accept the content - if we don't
read the content it will block and hang.
@@ -6,6 +6,7 @@ import (
"encoding/json"
"fmt"
"io"
+ "io/ioutil"
"runtime"
"time"
@@ -58,6 +59,9 @@ func DigestCopy(dst io.ReaderFrom, src io.Reader) (layerDigest, blobDigest diges
modTime = &gr.Header.ModTime
}
_, err = io.Copy(layerhash, gr)
+ if err != nil {
+ io.Copy(ioutil.Discard, pr)
+ }
ch <- err
}()
