Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save alexanderjamesking/73d2fce94a1a86bb463ea58a9c4f47a6 to your computer and use it in GitHub Desktop.
Save alexanderjamesking/73d2fce94a1a86bb463ea58a9c4f47a6 to your computer and use it in GitHub Desktop.
Java docker file
#
# Oracle Java 8 Dockerfile
#
# https://github.com/dockerfile/java
# https://github.com/dockerfile/java/tree/master/oracle-java8
#
# Pull base image.
FROM ubuntu:15.04
# Install Java.
RUN apt-get update && \
apt-get upgrade -y && \
apt-get install -y software-properties-common && \
add-apt-repository ppa:webupd8team/java -y && \
apt-get update && \
echo oracle-java7-installer shared/accepted-oracle-license-v1-1 select true | /usr/bin/debconf-set-selections && \
apt-get install -y oracle-java8-installer && \
apt-get clean
Add target/scala-2.11/akka-http-microservice-assembly-1.0.jar /service.jar
# Define working directory.
WORKDIR /data
# Define commonly used JAVA_HOME variable
ENV JAVA_HOME /usr/lib/jvm/java-8-oracle
# Define default command.
ENTRYPOINT ["java", "-jar", "/service.jar"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment