title: How can the jib maven plugin authenticate to docker hub and publish to ECR?
body: <p>I've been using the <a href="https://github.com/GoogleContainerTools/jib/tree/master/jib-maven-plugin" rel="nofollow noreferrer">jib-maven-plugin</a> to build docker tarball images from a bamboo container instance which is then pushed to an ECR.</p>
  <p>I have the following server instance in <code>~/.m2/settings.xml</code> which resides in the builder image:</p>
  <pre><code>&lt;server&gt;
    &lt;id&gt;registry.hub.docker.com&lt;/id&gt;
    &lt;username&gt;${docker.hub.username}&lt;/username&gt;
    &lt;password&gt;${docker.hub.password}&lt;/password&gt;
  &lt;/server&gt;
  </code></pre>
  <p>This I then call with maven:</p>
  <pre><code>mvn -Ddocker.hub.username=${bamboo.docker_hub_username} \
      -Ddocker.hub.password=${bamboo.docker_hub_password} \
      package deploy
  </code></pre>
  <p>where deploy is associated with the <code>buildTar</code> jib execution goal.</p>
  <p>This however does not seem to use my account when pulling images from dockerhub which I need for amazoncoretto.</p>
  <p>I recieve the following error from jib.</p>
  <pre><code>Failed to execute goal com.google.cloud.tools:jib-maven-plugin:2.6.0:buildTar (docker-package) on project auth-server: 429 Too Many Requests
  {
    &quot;errors&quot;: [
      {
        &quot;code&quot;: &quot;TOOMANYREQUESTS&quot;,
        &quot;message&quot;: &quot;You have reached your pull rate limit. You may increase the limit by authenticating and upgrading: https://www.docker.com/increase-rate-limit&quot;
      }
    ]
  }
  </code></pre>