Oct 26, 2018

Example of Ubuntu with Oracle Java docker file

FROM ubuntu:15.10
MAINTAINER I88.CA
RUN apt-get -y update && apt-get -y upgrade
# Add oracle java repository
RUN apt-get -y install software-properties-common
RUN add-apt-repository ppa:webupd8team/java
RUN apt-get -y update
# Accept the Oracle Java licence
RUN echo "oracle-java8-installer shared/accepted-oracle-license-v1-1 boolean true" | debconf-set-selections
# Install Oracle Java
RUN apt-get -y install oracle-java8-installer

It is on the hub:
https://hub.docker.com/r/i88ca/ubuntu-oracle-java/