Skip to content

Instantly share code, notes, and snippets.

@devonartis
Last active May 22, 2017 00:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save devonartis/898aa571902e3d8ac34e6d1f242abca7 to your computer and use it in GitHub Desktop.
Save devonartis/898aa571902e3d8ac34e6d1f242abca7 to your computer and use it in GitHub Desktop.
Oracle Java Dockerfile
FROM ubuntu:trusty
MAINTAINER Devon Artis<devon@devonartis.com>
RUN echo "deb http://archive.ubuntu.com/ubuntu trusty main universe" >> /etc/apt/sources.list
RUN apt-get update && apt-get -y install software-properties-common
RUN add-apt-repository ppa:webupd8team/java
RUN apt-get update && apt-get -y upgrade
# automatically accept oracle license
RUN echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | /usr/bin/debconf-set-selections
# and install java 8 oracle jdk
RUN apt-get -y install oracle-java8-installer && apt-get clean
RUN update-alternatives --display java
RUN echo "JAVA_HOME=/usr/lib/jvm/java-8-oracle" >> /etc/environment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment