update java

This commit is contained in:
Philipp Kunz 2017-06-30 19:23:26 +02:00
parent 87081d5bb6
commit 92e3f97efe
2 changed files with 11 additions and 21 deletions

View File

@ -1,5 +1,5 @@
# gitzone docker
image: hosttoday/ht-docker-dbase:latest
image: hosttoday/ht-docker-dbase:npmci
services:
- docker:dind
variables:
@ -14,7 +14,6 @@ stages:
- pages
before_script:
- yarn global add npmci
- npmci prepare docker
build:

View File

@ -1,23 +1,14 @@
FROM hosttoday/ht-docker-node:npmci
MAINTAINER Lossless GmbH <office@lossless.com>
# Java Version
ENV JAVA_VERSION=9 \
JAVA_UPDATE=ea \
JAVA_BUILD=168 \
JAVA_HOME=/usr/lib/jvm/current-java
# Install Java.
RUN \
echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | debconf-set-selections && \
add-apt-repository -y ppa:webupd8team/java && \
apt-get update && \
apt-get install -y oracle-java8-installer && \
rm -rf /var/lib/apt/lists/* && \
rm -rf /var/cache/oracle-jdk8-installer
# JDK: http://www.java.net/download/java/jdk9/archive/145/binaries/jdk-9-ea+145_linux-x64_bin.tar.gz
# JRE: http://www.java.net/download/java/jdk9/archive/145/binaries/jre-9-ea+145_linux-x64_bin.tar.gz
# JRE
RUN cd /tmp && wget --header "Cookie: oraclelicense=accept-securebackup-cookie;" \
"http://www.java.net/download/java/jdk9/archive/${JAVA_BUILD}/binaries/jre-${JAVA_VERSION}-${JAVA_UPDATE}+${JAVA_BUILD}_linux-x64_bin.tar.gz" && \
tar xzf "jre-${JAVA_VERSION}-${JAVA_UPDATE}+${JAVA_BUILD}_linux-x64_bin.tar.gz" && \
mkdir -p /usr/lib/jvm && mv "/tmp/jre-${JAVA_VERSION}" "/usr/lib/jvm/java-${JAVA_VERSION}-oracle" && \
ln -s "java-${JAVA_VERSION}-oracle" $JAVA_HOME && \
ln -s $JAVA_HOME/bin/java /usr/bin/java && \
rm -rf $JAVA_HOME/*.txt && \
rm -rf $JAVA_HOME/*.html && \
apk del wget ca-certificates curl && \
rm /tmp/* /var/cache/apk/*
# Define commonly used JAVA_HOME variable
ENV JAVA_HOME /usr/lib/jvm/java-8-oracle