Skip to content

Instantly share code, notes, and snippets.

@stevendborrelli
Created January 10, 2014 19:39
Show Gist options
  • Save stevendborrelli/8361147 to your computer and use it in GitHub Desktop.
Save stevendborrelli/8361147 to your computer and use it in GitHub Desktop.
Oracle 7 Java Dockerfile for ubuntu 12.0r
FROM ubuntu:12.04
MAINTAINER Quinten Krijger < qkrijger [at] gmail {dot} com>
# make sure the package repository is up to date
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 --display java
RUN echo "JAVA_HOME=/usr/lib/jvm/java-7-oracle" >> /etc/environment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment