title: Docker Push Adding Tags instead of Images
body: <p>I have a private AWS ECR repository where I am pushing images.</p>
  
  <p>I'm running the following commands to push images,</p>
  
  <pre><code>1. docker build -t $REPOSITORY_URL:develop -f ./docker/root/dockerfile .
  2. docker push $REPOSITORY_URL:develop
  </code></pre>
  
  <p>This works and I can see a new image in my repository with the right image URI and Tag of develop.</p>
  
  <p>However, when I try to add a new image with a different tag by using</p>
  
  <pre><code>1. docker build -t $REPOSITORY_URL:release -f ./docker/root/dockerfile .
  2. docker push $REPOSITORY_URL:release
  </code></pre>
  
  <p>In my ECR repositoy I don't see a new image but I see my original image with two tags. The original develop tag and now the release tag.</p>
  
  <p>I would expect since I am defining the <code>$REPOSITORY_URL:release</code> tag, as release, that when I run <code>docker push $REPOSITORY_URL:release</code> it would push my new image with a new tag, and I would be able to see two images in my ECR repository.</p>
  
  <p>Currently the images are identical for testing purposes. Which I think is what is causing this problem. If I run the above commands with a different image it works as expected.</p>
  
  <p>Is there a way to prevent this from happening? For example in production if I had to have identical images used my different tags, they would be able to push and work as expected?</p>