Dockerfile Example

 1FROM openjdk:8-jdk-alpine
 2MAINTAINER James Strong  
 3
 4ENV MAVEN_VERSION 3.3.9
 5
 6RUN apk --no-cache add curl
 7RUN curl -fsSLk https://archive.apache.org/dist/maven/maven-3/$MAVEN_VERSION/binaries/apache-maven-$MAVEN_VERSION-bin.tar.gz | tar xzf - -C /usr/share \
 8	&& mv /usr/share/apache-maven-$MAVEN_VERSION /usr/share/maven \
 9	&& ln -s /usr/share/maven/bin/mvn /usr/bin/mvn
10ENV MAVEN_HOME /usr/share/maven
11
12ADD pom.xml /work/pom.xml
13WORKDIR /work
14RUN ["mvn", "dependency:go-offline"]
15
16ADD ["src", "/work/src"]
17RUN ["mvn", "package"]
18
19EXPOSE 8080 
20ENTRYPOINT ["java", "-cp", "target/classes:target/dependency/*", "com.kumuluz.ee.EeApplication"]