title: Push docker container from locak to aws ecr
body: <p>When I attempt to push my tagged docker repo to ecr I receive error:</p>
  
  <pre><code> -&gt;  ~  docker push 169729465422.dkr.ecr.eu-west-1.amazonaws.com:latest                                                                                                                                                                                           1 ↵  1834  00:14:14
  The push refers to repository [docker.io/library/169729465422.dkr.ecr.eu-west-1.amazonaws.com]
  a41ec2e4dc40: Preparing
  62b872ff53d4: Preparing
  a628002c2154: Preparing
  9f15c5e37d02: Preparing
  efdebd147565: Preparing
  32411a9a984e: Waiting
  1bd26e8168dc: Waiting
  ffc9b21953f4: Waiting
  denied: requested access to the resource is denied
  </code></pre>
  
  <p>User has all permissions to push image ? :</p>
  
  <p><a href="https://i.stack.imgur.com/q9rfB.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/q9rfB.png" alt="enter image description here"></a></p>
  
  <p>I have followed steps to tag image:</p>
  
  <pre><code>aws ecr get-login-password --region eu-west-1 | docker login --username AWS --password-stdin 169729465422.dkr.ecr.eu-west-1.amazonaws.com
  
  docker tag cda-flask-app:latest 169729465422.dkr.ecr.eu-west-1.amazonaws.com
  
  docker push 169729465422.dkr.ecr.eu-west-1.amazonaws.com
  </code></pre>
  
  <p>I've configured the CLI using <code>aws configure</code> as per doc <a href="https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html#cli-quick-configuration" rel="nofollow noreferrer">https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html#cli-quick-configuration</a> . I don't believe I'm missing any steps, yet when I try to push the image i receive permissions issue. Is there an iextra step I need to complete in order to push the image from local to ecr ?</p>
  
  <p>Update:</p>
  
  <p>Using :</p>
  
  <pre><code>docker tag cda-flask-app:latest 169729465422.dkr.ecr.eu-west-1.amazonaws.com       
  
  docker push 169729465422.dkr.ecr.eu-west-1.amazonaws.com/cda-flask-app:latest
  </code></pre>
  
  <p>returns error:</p>
  
  <pre><code>The push refers to repository [169729465422.dkr.ecr.eu-west-1.amazonaws.com/cda-flask-app]
  a41ec2e4dc40: Preparing
  62b872ff53d4: Preparing
  a628002c2154: Preparing
  9f15c5e37d02: Preparing
  efdebd147565: Preparing
  32411a9a984e: Waiting
  1bd26e8168dc: Waiting
  ffc9b21953f4: Waiting
  name unknown: The repository with name 'cda-flask-app' does not exist in the registry with id '169729465422'
  </code></pre>