Commit 9729923a authored by Luca Cinquini's avatar Luca Cinquini
Browse files

Updating JDK version.

parent a78760e2
Loading
Loading
Loading
Loading
+6 −5
Original line number Diff line number Diff line
# Docker image based on Centos 6 that includes:
# Oracle Java 8

# Python 2.7 + a few common Python packages
# Supervisor
# Also includes common, non-site specific ESGF env variables (ESGF_HOME).
@@ -36,9 +35,11 @@ RUN yum -y install epel-release; yum clean all

# install Oracle Java 8
# see download string at: http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
ENV JAVA_VERSION 8u144
ENV JAVA_BUILD_VERSION b01
ENV JAVA_HASH=090f390dda5b47b9b721c7dfaa008135
# run scripts/get_oracle_jdk_linux_x64.sh to identify the correct URL

ENV JAVA_VERSION 8u152
ENV JAVA_BUILD_VERSION b16
ENV JAVA_HASH=aa0333dd3019491ca4f6ddbe78cdb6d0

RUN wget --no-cookies --no-check-certificate --header "Cookie: oraclelicense=accept-securebackup-cookie" \
    -O /tmp/jdk-8-linux-x64.rpm \
+1 −1
Original line number Diff line number Diff line
@@ -15,7 +15,7 @@ readonly DEFAULT_IMAGES_HUB=${ESGF_IMAGES_HUB-esgfhub}
readonly DEFAULT_PACKAGE_REPO=${ESGF_REPO-"http://distrib-coffee.ipsl.jussieu.fr/pub/esgf"}

#readonly ESGF_IMAGE_DIR_NAMES=('node' 'postgres' 'tomcat' 'solr' 'httpd' 'cog' 'data-node' 'idp-node' 'index-node' 'slcs' 'auth' 'node-manager' 'vsftp' 'solr-cloud')
readonly ESGF_IMAGE_DIR_NAMES=('node' 'postgres' 'tomcat' 'solr' 'httpd' 'cog' 'tds' 'orp' 'idp-node' 'index-node' 'slcs' 'auth')
readonly ESGF_IMAGE_DIR_NAMES=('node' 'postgres' 'tomcat' 'solr' 'httpd' 'cog' 'tds' 'orp' 'publisher' 'dashboard' 'idp-node' 'index-node' 'slcs' 'auth' 'node-manager')

readonly ESGF_IMAGE_PREFIX='esgf-'

+33 −0
Original line number Diff line number Diff line
#!/bin/bash

# You must accept the Oracle Binary Code License
# http://www.oracle.com/technetwork/java/javase/terms/license/index.html
# usage: get_jdk.sh <jdk_version> <ext>
# jdk_version: 8(default) or 9
# ext: rpm or tar.gz

jdk_version=${1:-8}
ext=${2:-rpm}

readonly url="http://www.oracle.com"
readonly jdk_download_url1="$url/technetwork/java/javase/downloads/index.html"
readonly jdk_download_url2=$(
    curl -s $jdk_download_url1 | \
    egrep -o "\/technetwork\/java/\javase\/downloads\/jdk${jdk_version}-downloads-.+?\.html" | \
    head -1 | \
    cut -d '"' -f 1
)
[[ -z "$jdk_download_url2" ]] && echo "Could not get jdk download url - $jdk_download_url1" >> /dev/stderr

readonly jdk_download_url3="${url}${jdk_download_url2}"
readonly jdk_download_url4=$(
    curl -s $jdk_download_url3 | \
    egrep -o "http\:\/\/download.oracle\.com\/otn-pub\/java\/jdk\/[8-9](u[0-9]+|\+).*\/jdk-${jdk_version}.*(-|_)linux-(x64|x64_bin).$ext"
)

for dl_url in ${jdk_download_url4[@]}; do
    wget --no-cookies \
         --no-check-certificate \
         --header "Cookie: oraclelicense=accept-securebackup-cookie" \
         -N $dl_url
done