title: Docker Image tagging in ECR
body: <p>I am pushing docker image in AWS ECR using Jenkins.</p>
  <p>While pushing the image I am providing tag as $Build_Number. So in ECR repo I have images with tags like 1,2,3,4.</p>
  <p>But when I am trying to pull the image from EC2 with below command from Jenkins job</p>
  <pre><code>docker pull 944XXX.dkr.ecr.us-east-1.amazonaws.com/repository1:latest
  </code></pre>
  <p>I am getting an error as there is no image with tag as latest.</p>
  <p>Here I want to pull the latest image (with tag 4). I cannot hard-code tag number here as docker pull command will run from Jenkins job automatically. So what way can I pull the latest image?</p>