Skip to content

Instantly share code, notes, and snippets.

@binhp
Last active October 23, 2018 04:41
Show Gist options
  • Save binhp/579c7269f3399ebaf47cae8395ee6518 to your computer and use it in GitHub Desktop.
Save binhp/579c7269f3399ebaf47cae8395ee6518 to your computer and use it in GitHub Desktop.
Docker debian 8 + java 8
# Pull base image.
FROM launcher.gcr.io/google/debian8:latest
# Install Java.
RUN \
echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | debconf-set-selections && \
add-apt-repository -y ppa:webupd8team/java && \
apt-get update && \
apt-get install -y oracle-java8-installer && \
rm -rf /var/lib/apt/lists/* && \
rm -rf /var/cache/oracle-jdk8-installer
# Define working directory.
WORKDIR /data
# Define commonly used JAVA_HOME variable
ENV JAVA_HOME /usr/lib/jvm/java-8-oracle
# Define default command.
CMD ["bash"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment