Created
May 7, 2017 20:37
-
-
Save stantonk/50b42f59b5f0d48b3d925d53916651d1 to your computer and use it in GitHub Desktop.
barebones Docker base image w/ Oracle JVM
This file contains hidden or 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
FROM ubuntu:16.04 | |
# Install Java8 | |
# Presumes you have downloaded / accepted the license file from Oracle's website. | |
# https://www.digitalocean.com/community/tutorials/how-to-manually-install-oracle-java-on-a-debian-or-ubuntu-vps | |
RUN mkdir /opt/jdk | |
COPY ./jdk-8u112-linux-x64.tar.gz /tmp/ | |
RUN tar -zxvf /tmp/jdk-8u112-linux-x64.tar.gz -C /opt/jdk | |
RUN update-alternatives --install /usr/bin/java java /opt/jdk/jdk1.8.0_112/bin/java 100 | |
RUN update-alternatives --install /usr/bin/javac javac /opt/jdk/jdk1.8.0_112/bin/javac 100 | |
RUN java -version | |
# always clean up after yourself in docker images to keep their size down! | |
RUN rm /tmp/jdk-8u112-linux-x64.tar.gz | |
# include any potentially needed packages | |
RUN apt-get update && apt-get install -y \ | |
wget \ | |
&& rm -rf /var/lib/apt/lists/* |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment