Oracle has implemented the OTN license to download and install the JDK. my query is , how we can implement this OTN mechanism in Dockerfile to download the JDK ?
previously, we used to have the "accept license" stuff mentioned here .
now, i am not able to find , how to add new OTN license info in dockerfile ?
this is the error i am getting :
--2019-06-11 12:30:58-- http://download.oracle.com/otn/java/jdk/8u211-b12/jdk-8u211-linux-x64.rpm Resolving download.oracle.com (download.oracle.com)... 23.208.140.200 Connecting to download.oracle.com (download.oracle.com)|23.208.140.200|:80... connected. HTTP request sent, awaiting response... 302 Moved Temporarily Location: https://edelivery.oracle.com/akam/otn/java/jdk/8u211-b12/jdk-8u211-linux-x64.rpm
[following] --2019-06-11 12:30:58-- https://edelivery.oracle.com/akam/otn/java/jdk/8u211-b12/jdk-8u211-linux-x64.rpm Resolving edelivery.oracle.com (edelivery.oracle.com)... 23.205.198.52, 2600:1404:23:189::366, 2600:1404:23:19b::366 Connecting to edelivery.oracle.com (edelivery.oracle.com)|23.205.198.52|:443... connected. HTTP request sent, awaiting response... 302 Moved Temporarily Location: https://login.oracle.com:443/oam/server/obrareq.cgi?encquery%3DnUf9lWZl8SXSVIuOAyrI0TMo%2FOmAILRpxAofH%2BuBpv9eLV8YAdmEENk4cpEEIImSh7%2Bz224paFAZbie%2Fs1G8v1157ZE%2Bu2uxUGSWVspQAhHciZMHwa14qSBmDSwNil7kYFwExQGzckmavRmezYC6TLpvGEkhNVmXvyYgOc7swj29yTyU%2BdsfeP8BKM0jYDvIA4v93DLoqDgUWZf0TmJCBpQwF8yS%2Bgd3tCm0YZrPlv4xIxbyYKGoTuv%2BOfF8NGCd2wUjmBHLjWG%2B65tXWryc3ybPI1tRbeZWOpPSeW%2BYlqv4s0HMSU8JBWLJBWY6lxP43E6EtI7JfkK%2BEAx%2FmawJtSWhpV8d%2BfekFMirQeOGe8QnFZWeozekGSOHmZmr3yYQOd3SAc3KTDk6SnJFl9p9E3a2BXK64EOIwdL7uYi%2FGzo08wiyBEncFiN5lVCpf4BX%20agentid%3Dedelivery-extprod%20ver%3D1%20crmethod%3D2%26cksum%3Dc92be7b91c2e259453c6fbf83efbd92c66fa451a&ECID-Context=1.005Ykhs7qOT7a6KaETu1US0004sd00063H%3BkXjE [following] --2019-06-11 12:30:58-- https://login.oracle.com/oam/server/obrareq.cgi?encquery%3DnUf9lWZl8SXSVIuOAyrI0TMo%2FOmAILRpxAofH%2BuBpv9eLV8YAdmEENk4cpEEIImSh7%2Bz224paFAZbie%2Fs1G8v1157ZE%2Bu2uxUGSWVspQAhHciZMHwa14qSBmDSwNil7kYFwExQGzckmavRmezYC6TLpvGEkhNVmXvyYgOc7swj29yTyU%2BdsfeP8BKM0jYDvIA4v93DLoqDgUWZf0TmJCBpQwF8yS%2Bgd3tCm0YZrPlv4xIxbyYKGoTuv%2BOfF8NGCd2wUjmBHLjWG%2B65tXWryc3ybPI1tRbeZWOpPSeW%2BYlqv4s0HMSU8JBWLJBWY6lxP43E6EtI7JfkK%2BEAx%2FmawJtSWhpV8d%2BfekFMirQeOGe8QnFZWeozekGSOHmZmr3yYQOd3SAc3KTDk6SnJFl9p9E3a2BXK64EOIwdL7uYi%2FGzo08wiyBEncFiN5lVCpf4BX%20agentid%3Dedelivery-extprod%20ver%3D1%20crmethod%3D2%26cksum%3Dc92be7b91c2e259453c6fbf83efbd92c66fa451a&ECID-Context=1.005Ykhs7qOT7a6KaETu1US0004sd00063H%3BkXjE Resolving login.oracle.com (login.oracle.com)... 156.151.58.18 Connecting to login.oracle.com (login.oracle.com)|156.151.58.18|:443... connected.
dockerfile is :
FROM centos
ENV UPDATE_VERSION=8u73
ENV JAVA_VERSION=1.8.0_73
ENV BUILD=b02
RUN yum -y update && \
yum -y install wget && \
wget -c --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/${UPDATE_VERSION}-${BUILD}/jdk-${UPDATE_VERSION}-linux-x64.rpm" --output-document="jdk-${UPDATE_VERSION}-linux-x64.rpm" && \
rpm -i jdk-${UPDATE_VERSION}-linux-x64.rpm && \
alternatives --install /usr/bin/java java /usr/java/jdk${JAVA_VERSION}/bin/java 1 && \
alternatives --set java /usr/java/jdk${JAVA_VERSION}/bin/java && \
export JAVA_HOME=/usr/java/jdk${JAVA_VERSION}/ && \
echo "export JAVA_HOME=/usr/java/jdk${JAVA_VERSION}/" | tee /etc/environment && \
source /etc/environment && \
rm jdk-${UPDATE_VERSION}-linux-x64.rpm
ENV JAVA_HOME=/usr/java/jdk${JAVA_VERSION}/