title: Piping data from the host into docker container command not working with docker machine
body: <p>I'm running Docker on Windows 10 hosted using <a href="https://docs.docker.com/machine/" rel="nofollow noreferrer">docker-machine</a>. I'm trying to pipe data from host into a container spawn with 'docker run' with this command:</p>
  
  <pre><code>echo test | docker run -i ubuntu:16.04 cat -
  </code></pre>
  
  <p>I'd expect this command to output 'test' to the stdout, but all it does is print a blank line:</p>
  
  <pre><code>jannis MINGW64 ~
  $ echo test | docker run -i ubuntu:16.04 cat -
  
  jannis MINGW64 ~
  $
  </code></pre>
  
  <p>However when I ssh into the docker-machine the command works as expected:</p>
  
  <pre><code>jannis MINGW64 ~
  $ docker-machine ssh
                          ##         .
                    ## ## ##        ==
                 ## ## ## ## ##    ===
             /"""""""""""""""""\___/ ===
        ~~~ {~~ ~~~~ ~~~ ~~~~ ~~~ ~ /  ===- ~~~
             \______ o           __/
               \    \         __/
                \____\_______/
   _                 _   ____     _            _
  | |__   ___   ___ | |_|___ \ __| | ___   ___| | _____ _ __
  | '_ \ / _ \ / _ \| __| __) / _` |/ _ \ / __| |/ / _ \ '__|
  | |_) | (_) | (_) | |_ / __/ (_| | (_) | (__|   &lt;  __/ |
  |_.__/ \___/ \___/ \__|_____\__,_|\___/ \___|_|\_\___|_|
  Boot2Docker version 17.06.1-ce, build HEAD : 80114bc - Fri Aug 18 17:58:04 UTC 2017
  Docker version 17.06.1-ce, build 874a737
  docker@default:~$ echo test | docker run -i ubuntu:16.04 cat -
  test
  </code></pre>
  
  <p>Can someone tell me:</p>
  
  <ol>
  <li>Why piping into a container within docker-machine doesn't work? Is this a bug?</li>
  <li>Is there a workaround for this (apart from the one provided above - ssh into the docker-machine VM)?</li>
  </ol>
  
  <p>PS I'm using <a href="https://git-for-windows.github.io/" rel="nofollow noreferrer">GitBash environment</a> (based on <a href="http://www.msys2.org/" rel="nofollow noreferrer">MSYS2</a>/<a href="http://www.mingw.org/" rel="nofollow noreferrer">MINGW</a>) on my Windows 10 machine. Version info:</p>
  
  <pre><code>jannis MINGW64 ~
  $ uname -a
  MINGW64_NT-10.0 jannis 2.6.1(0.306/5/3) 2017-01-14 09:41 x86_64 Msys
  
  jannis MINGW64 ~
  $ docker version
  Client:
   Version:      17.06.0-ce
   API version:  1.30
   Go version:   go1.8.3
   Git commit:   02c1d87
   Built:        Fri Jun 23 21:30:30 2017
   OS/Arch:      windows/amd64
  
  Server:
   Version:      17.06.1-ce
   API version:  1.30 (minimum version 1.12)
   Go version:   go1.8.3
   Git commit:   874a737
   Built:        Thu Aug 17 22:54:55 2017
   OS/Arch:      linux/amd64
   Experimental: false
  </code></pre>