title: How to setup AWS ECS + dockerfile-maven-plugin?
body: <p>I am trying to setup my project's <code>pom.xml</code> and Maven's <code>settings.xml</code> to automate the process of generating a Docker image and pushing it to my <a href="https://aws.amazon.com/ecs/" rel="nofollow noreferrer">AWS ECS</a> private Docker repository.</p>
  
  <p>In my <code>pom.xml</code>, I added the <a href="https://github.com/spotify/dockerfile-maven" rel="nofollow noreferrer">dockerfile-maven-plugin</a> and configured it as follows:</p>
  
  <pre><code>&lt;plugin&gt;
      &lt;groupId&gt;com.spotify&lt;/groupId&gt;
      &lt;artifactId&gt;dockerfile-maven-plugin&lt;/artifactId&gt;
      &lt;version&gt;1.3.6&lt;/version&gt;
      &lt;executions&gt;
          &lt;execution&gt;
              &lt;id&gt;default&lt;/id&gt;
              &lt;goals&gt;
                  &lt;goal&gt;build&lt;/goal&gt;
                  &lt;goal&gt;push&lt;/goal&gt;
              &lt;/goals&gt;
          &lt;/execution&gt;
      &lt;/executions&gt;
      &lt;configuration&gt;
          &lt;finalName&gt;myproject/server&lt;/finalName&gt;
          &lt;repository&gt;137037344249.dkr.ecr.us-east-2.amazonaws.com/myproject/server&lt;/repository&gt;
          &lt;tag&gt;${docker.image.tag}&lt;/tag&gt;
          &lt;serverId&gt;ecs-docker&lt;/serverId&gt;
          &lt;useMavenSettingsForAuth&gt;true&lt;/useMavenSettingsForAuth&gt;
          &lt;buildArgs&gt;
              &lt;VERSION&gt;${project.version}&lt;/VERSION&gt;
              &lt;BUILD_NUMBER&gt;${buildNumber}&lt;/BUILD_NUMBER&gt;
              &lt;WAR_FILE&gt;${project.build.finalName}.war&lt;/WAR_FILE&gt;
          &lt;/buildArgs&gt;
      &lt;/configuration&gt;
  &lt;/plugin&gt;
  </code></pre>
  
  <p>Per the <a href="https://github.com/spotify/dockerfile-maven" rel="nofollow noreferrer">instructions</a> given by dockerfile-maven-plugin, I need to add configurations for my ECS server authentication, but I don't know what username / password I need to provide.  I doubt it's my AWS login user/pass.</p>
  
  <pre><code>&lt;servers&gt;
      &lt;server&gt;
          &lt;id&gt;ecs-docker&lt;/id&gt;
          &lt;username&gt;where_to_get_this&lt;/username&gt;
          &lt;password&gt;where_to_get_this&lt;/password&gt;
      &lt;/server&gt;
  &lt;/servers&gt;
  </code></pre>
  
  <p>Also, any suggestions to automate this Docker image generation / pushing to my repo in a better way are welcome.</p>