From 75f8d7ebb54874f73cb0fcaea3d882aac04a3fdc Mon Sep 17 00:00:00 2001 From: Tonis Tiigi Date: Thu, 26 Sep 2019 09:10:39 -0700 Subject: [PATCH] build: use correct in-memory input Signed-off-by: Tonis Tiigi --- build/build.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build/build.go b/build/build.go index 5e748b55..84fe4de9 100644 --- a/build/build.go +++ b/build/build.go @@ -735,7 +735,7 @@ func LoadInputs(inp Inputs, target *client.SolveOpt) (func(), error) { return nil, errStdinConflict } - buf := bufio.NewReader(os.Stdin) + buf := bufio.NewReader(inp.InStream) magic, err := buf.Peek(archiveHeaderSize * 2) if err != nil && err != io.EOF { return nil, errors.Wrap(err, "failed to peek context header from STDIN") @@ -761,7 +761,7 @@ func LoadInputs(inp Inputs, target *client.SolveOpt) (func(), error) { target.LocalDirs["context"] = inp.ContextPath switch inp.DockerfilePath { case "-": - dockerfileReader = os.Stdin + dockerfileReader = inp.InStream case "": dockerfileDir = inp.ContextPath default: