title: Piping a dockerfile string to `docker build` from Node.js is not working
body: <p>I am trying to pipe a Dockerfile to <code>docker build</code> via stdin as mentioned here: </p>
  
  <p><a href="https://docs.docker.com/engine/reference/commandline/build/#specify-a-dockerfile--f" rel="nofollow noreferrer">https://docs.docker.com/engine/reference/commandline/build/#specify-a-dockerfile--f</a></p>
  
  <p>I have tried everything, and Docker just doesn't seem to accept the my stdin.</p>
  
  <pre><code>const dockerfileStr = 'FROM alpine-node'
  const child = spawn('docker build . -f -', {shell:true, stdio: ['pipe', 'inherit']})
  child.stdin.write(dockerfileStr + '\n')
  child.stdin.end()
  </code></pre>
  
  <p>Maybe it expects a <code>tty</code>?</p>
  
  <p>The PR that added this request is here: <a href="https://github.com/moby/moby/pull/31236/files" rel="nofollow noreferrer">https://github.com/moby/moby/pull/31236/files</a></p>