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
27 lines (19 loc) · 886 Bytes
/
Dockerfile
File metadata and controls
27 lines (19 loc) · 886 Bytes
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
27
# java
#
# VERSION Java 8 on CentOS Latest
# use the centos base image from CentOS Official Repository
FROM centos
MAINTAINER Evan Montgomery-Recht <recht_evan@bah.com>
ENV JAVA_VERSION 8u65
ENV BUILD_VERSION b17
# 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/jdk-$JAVA_VERSION-linux-x64.rpm" -O /tmp/jdk-8-linux-x64.rpm
RUN yum -y install /tmp/jdk-8-linux-x64.rpm
RUN yum clean all
RUN alternatives --install /usr/bin/java java /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