Docker - Java 10

Dockerfile for Java 10.

FROM buildpack-deps:jessie-curl

# Setup User
RUN groupadd -r nnoby && useradd -r -m -g nnoby nnoby

# Java Version
# http://www.oracle.com/technetwork/java/javase/downloads/index.html
# http://download.oracle.com/otn-pub/java/jdk/10.0.2+13/19aef61b38124481863b1413dce1855f/serverjre-10.0.2_linux-x64_bin.tar.gz
ENV JAVA_VERSION_MAJOR 10
ENV JAVA_VERSION_MINOR 0
ENV JAVA_VERSION_PATCH 2
ENV JAVA_VERSION_BUILD 13
ENV JAVA_PACKAGE       serverjre
ENV JAVA_CHECKSUM      19aef61b38124481863b1413dce1855f

# Download and unarchive Java

RUN set -x\
 && curl -LOH "Cookie: oraclelicense=accept-securebackup-cookie"\
      http://download.oracle.com/otn-pub/java/jdk/${JAVA_VERSION_MAJOR}.${JAVA_VERSION_MINOR}.${JAVA_VERSION_PATCH}+${JAVA_VERSION_BUILD}/${JAVA_CHECKSUM}/${JAVA_PACKAGE}-${JAVA_VERSION_MAJOR}.${JAVA_VERSION_MINOR}.${JAVA_VERSION_PATCH}_linux-x64_bin.tar.gz\
 && tar -xvzf ${JAVA_PACKAGE}-${JAVA_VERSION_MAJOR}.${JAVA_VERSION_MINOR}.${JAVA_VERSION_PATCH}_linux-x64_bin.tar.gz -C /opt\
 && rm ${JAVA_PACKAGE}-${JAVA_VERSION_MAJOR}.${JAVA_VERSION_MINOR}.${JAVA_VERSION_PATCH}_linux-x64_bin.tar.gz\
 && ln -s /opt/jdk-${JAVA_VERSION_MAJOR}.${JAVA_VERSION_MINOR}.${JAVA_VERSION_PATCH} /opt/jdk

# Set environment
ENV JAVA_HOME /opt/jdk
ENV PATH ${PATH}:${JAVA_HOME}/bin