title: automatic docker login within a bash script
body: <p>How can I preseed my credentials to <code>docker login</code> command within a script ?</p>
  
  <p>I'm using a bash script that basically automates the whole process of setting up my custom VMs etc, but when I need to login to docker within the script to pull the images, I get the following error:<br></p>
  
  <blockquote>
    <p>Username: FATA[0000] inappropriate ioctl for device</p>
  </blockquote>
  
  <p><br>
  The command I was using is the following:</p>
  
  <pre><code>( echo "xxx"; echo "yyy"; echo "zzz" ) | docker login docker.somesite.org
  </code></pre>
  
  <p><br>Is this possible to achieve without using and coping over an existing <code>.dockercfg</code> file and how,
  <br>Many thanks.</p>