forked from Kong/docker-java8
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
28 lines (19 loc) · 884 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# java
#
# VERSION Java 8
# use the centos base image provided by dotCloud
FROM centos:7
MAINTAINER Marco Palladino, [email protected]
ENV JAVA_VERSION=8u144
ENV BUILD_VERSION=b01
ENV UUID=090f390dda5b47b9b721c7dfaa008135
# Upgrading system
RUN yum -y upgrade
RUN yum -y install wget
# Downloading Java
RUN wget --no-cookies --no-check-certificate --header "Cookie: oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/$JAVA_VERSION-$BUILD_VERSION/$UUID/jdk-$JAVA_VERSION-linux-x64.rpm" -O /tmp/jdk-8-linux-x64.rpm
RUN yum -y install /tmp/jdk-8-linux-x64.rpm
RUN alternatives --install /usr/bin/java jar /usr/java/latest/bin/java 200000
RUN alternatives --install /usr/bin/javaws javaws /usr/java/latest/bin/javaws 200000
RUN alternatives --install /usr/bin/javac javac /usr/java/latest/bin/javac 200000
ENV JAVA_HOME /usr/java/latest