forked from Kong/docker-java8
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
25 lines (19 loc) · 937 Bytes
/
Dockerfile
File metadata and controls
25 lines (19 loc) · 937 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# java
# VERSION Java 8
FROM centos:centos7
MAINTAINER Oliver Guggenbuehl, [email protected]
ENV JAVA_VERSION 8u101
ENV BUILD_VERSION b13
# Downloading Java
RUN yum -y install wget && \
wget --no-cookies --quiet --no-check-certificate \
--header "Cookie: oraclelicense=accept-securebackup-cookie" \
"http://download.oracle.com/otn-pub/java/jdk/$JAVA_VERSION-$BUILD_VERSION/jdk-$JAVA_VERSION-linux-x64.rpm" \
-O /tmp/jdk-8-linux-x64.rpm && \
yum -y install /tmp/jdk-8-linux-x64.rpm && \
alternatives --install /usr/bin/java jar /usr/java/latest/bin/java 200000 && \
alternatives --install /usr/bin/javaws javaws /usr/java/latest/bin/javaws 200000 && \
alternatives --install /usr/bin/javac javac /usr/java/latest/bin/javac 200000 && \
alternatives --set java /usr/java/jdk1.8.0_101/jre/bin/java && \
rm -rf /tmp/jdk-8-linux-x64.rpm && yum clean all
ENV JAVA_HOME /usr/java/latest