2016-04-25 20:28:21 +02:00
|
|
|
FROM java:openjdk-8-jdk-alpine
|
2015-11-15 20:59:29 +01:00
|
|
|
|
2016-04-25 20:28:21 +02:00
|
|
|
RUN MAVEN_VERSION=3.3.3 \
|
|
|
|
&& cd /usr/share \
|
|
|
|
&& wget http://archive.apache.org/dist/maven/maven-3/$MAVEN_VERSION/binaries/apache-maven-$MAVEN_VERSION-bin.tar.gz -O - | tar xzf - \
|
|
|
|
&& mv /usr/share/apache-maven-$MAVEN_VERSION /usr/share/maven \
|
|
|
|
&& ln -s /usr/share/maven/bin/mvn /usr/bin/mvn
|
2015-11-15 20:59:29 +01:00
|
|
|
|
|
|
|
WORKDIR /code
|
|
|
|
|
|
|
|
ADD pom.xml /code/pom.xml
|
|
|
|
RUN ["mvn", "dependency:resolve"]
|
|
|
|
RUN ["mvn", "verify"]
|
|
|
|
|
|
|
|
# Adding source, compile and package into a fat jar
|
|
|
|
ADD src /code/src
|
|
|
|
RUN ["mvn", "package"]
|
|
|
|
|
2016-04-25 20:28:21 +02:00
|
|
|
CMD ["java", "-jar", "target/worker-jar-with-dependencies.jar"]
|