Skip to content

Instantly share code, notes, and snippets.

@damianperera
Created January 27, 2020 14:23
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save damianperera/24da4e626681e7c7c027b28585d058dd to your computer and use it in GitHub Desktop.
Save damianperera/24da4e626681e7c7c027b28585d058dd to your computer and use it in GitHub Desktop.
Dockerfile for an Oracle JDK 8u191 run-time based on Ubuntu 18.04 Minimal
FROM ubuntu:18.04
LABEL maintainer="damianperera@medium.com"
# Install necessary packages
RUN apt-get update -y && \
apt-get install -y g++ build-essential gcc libc6-dev python2.7 python2.7-dev supervisor cron vim unzip curl wget tree
COPY jdk-8u191-linux-x64.tar.gz .
RUN mkdir -p /opt/jdk && \
tar -zvxf jdk-8u191-linux-x64.tar.gz -C /opt/jdk && \
rm jdk-8u191-linux-x64.tar.gz
RUN update-alternatives --install /usr/bin/java java /opt/jdk/jdk1.8.0_191/bin/java 100 && \
update-alternatives --install /usr/bin/javac javac /opt/jdk/jdk1.8.0_191/bin/javac 100 && \
update-alternatives --display java && \
update-alternatives --display javac && \
java -version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment