Skip to content

Instantly share code, notes, and snippets.

@necrobious
Created September 17, 2014 23:50
Show Gist options
  • Save necrobious/02901a360795465366d3 to your computer and use it in GitHub Desktop.
Save necrobious/02901a360795465366d3 to your computer and use it in GitHub Desktop.
Docker file for getting recent Oracle JDK installed on Ubuntu 14.04
# build with
# docker build -t 'necrobious/base-ubuntu-oracle-jdk' .
FROM ubuntu:14.04
MAINTAINER necrobious@gmail.com
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get -y update
RUN apt-get -y upgrade
RUN apt-get -y install curl
RUN mkdir -p /opt/jdk
RUN curl -LOs -H 'Cookie: oraclelicense=accept-securebackup-cookie' 'http://download.oracle.com/otn-pub/java/jdk/7u67-b01/jdk-7u67-linux-x64.tar.gz'
RUN tar -zxf jdk-7u67-linux-x64.tar.gz -C /opt/jdk
RUN update-alternatives --install /usr/bin/java java /opt/jdk/jdk1.7.0_67/bin/java 100
RUN update-alternatives --install /usr/bin/javac javac /opt/jdk/jdk1.7.0_67/bin/javac 100
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment