From cdb00332dac3ce9b2ebc76e65afe0347a941cc15 Mon Sep 17 00:00:00 2001 From: Jake Torrance Date: Tue, 1 Nov 2022 22:11:26 +0000 Subject: [PATCH] Docker compat build api - make sure only one line appears per flush Closes #16360 Signed-off-by: Jake Torrance Signed-off-by: Jake Torrance --- pkg/api/handlers/compat/images_build.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/api/handlers/compat/images_build.go b/pkg/api/handlers/compat/images_build.go index d4c8c0743a..4a11065b2b 100644 --- a/pkg/api/handlers/compat/images_build.go +++ b/pkg/api/handlers/compat/images_build.go @@ -804,6 +804,7 @@ func BuildImage(w http.ResponseWriter, r *http.Request) { if err := enc.Encode(m); err != nil { logrus.Warnf("failed to json encode error %v", err) } + flush() m.Aux = nil m.Stream = fmt.Sprintf("Successfully built %12.12s\n", imageID) if err := enc.Encode(m); err != nil {