diff --git a/commands.go b/commands.go index 3f151a9d51..3020459f02 100644 --- a/commands.go +++ b/commands.go @@ -1213,7 +1213,7 @@ func hijack(method, path string, setRawTerminal bool) error { sendStdin := Go(func() error { _, err := io.Copy(rwc, os.Stdin) if err := rwc.(*net.TCPConn).CloseWrite(); err != nil { - fmt.Fprintf(os.Stderr, "Couldn't send EOF: " + err.Error()) + fmt.Fprintf(os.Stderr, "Couldn't send EOF: "+err.Error()) } return err }) diff --git a/server.go b/server.go index a2525a9b90..788e6bdf08 100644 --- a/server.go +++ b/server.go @@ -338,13 +338,7 @@ func (srv *Server) ImageImport(src, repo, tag string, file *os.File) error { var resp *http.Response if src == "-" { - r, w := io.Pipe() - go func() { - defer w.Close() - defer Debugf("Closing buffered stdin pipe") - io.Copy(w, file) - }() - archive = r + archive = file } else { u, err := url.Parse(src) if err != nil {