title: docker login on jenkins
body: <p>I have this:</p>
  
  <pre><code>docker login -u AWS --password-stdin https://aws_account_id.dkr.ecr.us-east-1.amazonaws.com
  Error: Cannot perform an interactive login from a non TTY device
  Build step 'Execute shell' marked build as failure
  </code></pre>
  
  <p>how can we run docker login (or the equivalent) on a Jenkins server?</p>
  
  <p>I was able to get around this problem by using:</p>
  
  <pre><code>eval "$(aws ecr get-login --no-include-email --region ${region} --profile ${profile})"
  </code></pre>
  
  <p>but then I get this error after I try to run <code>docker push</code>:</p>
  
  <blockquote>
    <p>no basic auth credentials</p>
  </blockquote>