Skip to content

Instantly share code, notes, and snippets.

@m-tmatma
Last active October 3, 2020 03:48
Show Gist options
  • Save m-tmatma/1bebb33ab2ed47e7c00385e2d87fbd27 to your computer and use it in GitHub Desktop.
Save m-tmatma/1bebb33ab2ed47e7c00385e2d87fbd27 to your computer and use it in GitHub Desktop.
Dockerfile JDK 8
FROM ubuntu:16.04
ENV DEBIAN_FRONTEND noninteractive
RUN sed -i.bak -r 's!(deb|deb-src) \S+!\1 mirror://mirrors.ubuntu.com/mirrors.txt!' /etc/apt/sources.list \
&& apt-get update -y \
&& apt-get install -y software-properties-common \
&& add-apt-repository ppa:openjdk-r/ppa \
&& apt-get install -y openjdk-8-jdk \
&& rm -rf /var/lib/apt/lists/*
# java
ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment