Add a progress bar for ADD <url> <dst>
Signed-off-by: Victor Vieux <vieux@docker.com> Upstream-commit: 4e40d09a2b13c1f7886783fa66b9fdfeb5369375 Component: engine
This commit is contained in:
@ -151,10 +151,11 @@ func (b *Builder) runContextCommand(args []string, allowRemote bool, allowDecomp
|
||||
defer os.RemoveAll(tmpDirName)
|
||||
|
||||
// Download and dump result to tmp file
|
||||
if _, err := io.Copy(tmpFile, resp.Body); err != nil {
|
||||
if _, err := io.Copy(tmpFile, utils.ProgressReader(resp.Body, int(resp.ContentLength), b.OutOld, b.StreamFormatter, true, "", "Downloading")); err != nil {
|
||||
tmpFile.Close()
|
||||
return err
|
||||
}
|
||||
fmt.Fprintf(b.OutStream, "\n")
|
||||
tmpFile.Close()
|
||||
|
||||
// Remove the mtime of the newly created tmp file
|
||||
|
||||
Reference in New Issue
Block a user