Created
November 5, 2013 20:17
-
-
Save barata0/7325448 to your computer and use it in GitHub Desktop.
lxc-docker ubuntu oracle-java7-jdk
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
#Oracle JDK installation | |
# | |
FROM ubuntu:precise | |
MAINTAINER Daniel Ribeiro <danieltribeiro@gmail.com> | |
RUN echo "deb http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/sources.list | |
RUN apt-get update && apt-get -y install python-software-properties | |
RUN add-apt-repository ppa:webupd8team/java | |
RUN apt-get update && apt-get -y upgrade | |
# automatically accept oracle license | |
RUN echo oracle-java7-installer shared/accepted-oracle-license-v1-1 select true | /usr/bin/debconf-set-selections | |
# and install java 7 oracle jdk | |
RUN apt-get -y install oracle-java7-installer && apt-get clean | |
RUN update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/java-7-oracle/bin/java" 1 | |
RUN update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/java-7-oracle/bin/javac" 1 | |
RUN update-alternatives --install "/usr/bin/javaws" "javaws" "/usr/lib/jvm/java-7-oracle/bin/javaws" 1 | |
# set JAVA_HOME env var | |
ENV JAVA_HOME /usr/lib/jvm/java-7-oracle |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment