title: Netcat extremely slow when run through node inside Docker
body: <p>Steps to reproduce the issue: </p>
  
  <ol>
  <li>Latest Docker for Mac: Version 17.12.0-ce-mac55 (23011)</li>
  <li><em>docker run -it node /bin/bash</em></li>
  </ol>
  
  <p>(Inside the container)</p>
  
  <ol start="3">
  <li><em>apt-get update</em></li>
  <li><em>apt-get install -y netcat</em></li>
  <li><em>node</em></li>
  <li>Run the following: </li>
  </ol>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>const child_process = require('child_process');
  
  console.time("Executed nc in ");
  var output = child_process.spawnSync('nc', ['-w', '5', '&lt;hostname of host with SSH&gt;', 22, '&lt;&lt;&lt;', '\0']).stdout.toString();
  console.timeEnd("Executed nc in ");
  console.log(output);</code></pre>
  </div>
  </div>
  </p>
  
  <p>The result will contain <em>Executed nc in : XX ms</em>, I am seeing XX in the 10 second range.</p>
  
  <p>When I run netcat on the same container outside of node with <strong><em>nc -w 5 [hostname with SSH] 22 &lt;&lt;&lt; '\0'</em></strong>, it executes in less than a second.</p>