From 92e3f97efe0ad97bd68b0136c3a6da402cd56128 Mon Sep 17 00:00:00 2001 From: Phil Kunz Date: Fri, 30 Jun 2017 19:23:26 +0200 Subject: [PATCH] update java --- .gitlab-ci.yml | 3 +-- Dockerfile_npmcijava | 29 ++++++++++------------------- 2 files changed, 11 insertions(+), 21 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 823555e..8da4bbf 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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: diff --git a/Dockerfile_npmcijava b/Dockerfile_npmcijava index 36cb20a..03b22ac 100644 --- a/Dockerfile_npmcijava +++ b/Dockerfile_npmcijava @@ -1,23 +1,14 @@ FROM hosttoday/ht-docker-node:npmci MAINTAINER Lossless GmbH -# 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/* \ No newline at end of file +# Define commonly used JAVA_HOME variable +ENV JAVA_HOME /usr/lib/jvm/java-8-oracle