title: Docker 'latest' Tagging and Pushing
body: <p>I have a docker image generated from my build process. I am looking to tag the latest build image with tag build id and 'latest'. I see two ways to do this.</p>
  
  <p>First approach - (Add Multiple tags and Push once)  </p>
  
  <pre><code>docker tag &lt;id&gt; &lt;user&gt;/&lt;image&gt;:build_id  
  docker tag &lt;id&gt; &lt;user&gt;/&lt;image&gt;:latest  
  docker push &lt;user&gt;/&lt;image&gt;
  </code></pre>
  
  <p>Second - Tag individually and push  </p>
  
  <pre><code>docker tag &lt;id&gt; &lt;user&gt;/&lt;image&gt;:build_id  
  docker push &lt;user&gt;/&lt;image&gt;:build_id
  
  docker tag &lt;id&gt; &lt;user&gt;/&lt;image&gt;:latest  
  docker push &lt;user&gt;/&lt;image&gt;:latest
  </code></pre>
  
  <p>The docker documentation says if there is an image in the registry with a specific tag already, then docker push with a new image with same tag would overwrite the earlier image.   </p>
  
  <ol>
  <li>Are both First and Second Option specified above functionally the same?  </li>
  <li>Is there any preferred way/Best practice?</li>
  </ol>