title: Install JDK 8 update 172 in dockerfile with ubuntu image
body: <p>I am used to download java in my dockerfile like this :</p>
  
  <pre><code># Install Java
  ENV JAVA_VERSION_MAJOR 8
  ENV JAVA_VERSION_MINOR 162
  ENV JAVA_VERSION_BUILD 12
  ENV JAVA_DOWNLOAD_HASH 0da788060d494f5095bf8624735fa2f1
  RUN mkdir -p /usr/lib/jvm \
      &amp;&amp; cd /usr/lib/jvm \
      &amp;&amp; wget -nv --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/${JAVA_VERSION_MAJOR}u${JAVA_VERSION_MINOR}-b${JAVA_VERSION_BUILD}/${JAVA_DOWNLOAD_HASH}/jdk-${JAVA_VERSION_MAJOR}u${JAVA_VERSION_MINOR}-linux-x64.tar.gz \
      &amp;&amp; tar xf jdk-${JAVA_VERSION_MAJOR}u${JAVA_VERSION_MINOR}-linux-x64.tar.gz \
      &amp;&amp; rm jdk-${JAVA_VERSION_MAJOR}u${JAVA_VERSION_MINOR}-linux-x64.tar.gz \
      &amp;&amp; update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jdk1.${JAVA_VERSION_MAJOR}.0_${JAVA_VERSION_MINOR}/bin/java" 1
  ENV JAVA_HOME /usr/lib/jvm/jdk1.${JAVA_VERSION_MAJOR}.0_${JAVA_VERSION_MINOR}
  </code></pre>
  
  <p>Apparently, oracle has released new update <a href="http://www.oracle.com/technetwork/java/javase/8u172-relnotes-4308893.html" rel="noreferrer">8u172</a> and download within dockerfile is failing with <code>ERROR 404: Not Found.</code></p>
  
  <p>My question is , how do I find out <code>JAVA_DOWNLOAD_HASH</code> variable ?</p>
  
  <p>Rest of variable values are clear to me :</p>
  
  <pre><code>JAVA_VERSION_MAJOR 8
  JAVA_VERSION_MINOR 172
  JAVA_VERSION_BUILD 11
  </code></pre>
  
  <p>Please note that my base docker image is : <code>ubuntu:16.04</code></p>
  
  <p>My installation of java within ubuntu is inspired from <a href="https://github.com/dockerfile/java/issues/36" rel="noreferrer">here</a></p>