title: Version increment for docker images
body: <p>I am planning to build an IMAGE with the below command but the command is not executing. Could you please tell me what is the error in the below script?</p>
  
  <p>IMAGE=testimage</p>
  
  <pre><code>ID=$(docker build  -t ${IMAGE} .  | tail -1 | sed 's/.*Successfully built \(.*\)$/\1/')
  echo $ID
  docker tag ${ID} pushdocker/${IMAGE}:${VERSION}
  </code></pre>
  
  <p>here <code>pushdocker</code> is my Docker hub namespace</p>